1.How big is the datatype int in .NET? 32 bits.
2.How big is the char? 16 bits (Unicode).
3.How do you initiate a string without escaping each backslash?Put
\u2022public static void Main()
\u2022public static int Main()
\u2022public static void Main( string args )
\u2022public static int Main(string args )
\u2022Structs cannot be inherited.
\u2022Structsare passed by value, not by reference.
\u2022Structis stored on the stack, not the heap.
not garbage-collected, they just fall off the stack when they fall out of
scope, the reference-type objects are picked up by GC when their references
Sun left the implementation of a specific garbage collector up to the
JRE developer, so their performance varies widely, depending on whose JRE
you\u2019re using. Microsoft standardized on their garbage collection.
but what\u2019s the point, since it will call Finalize(), and Finalize()
has no guarantees when the memory will be cleaned up, plus, it introduces
additional load on the garbage collector.
readonly variables to some runtime values. Let\u2019s say your program uses current date and time as one of the values that won\u2019t change. This way you declare public readonly string DateT = new DateTime().ToString().
and run in the .NET Framework using a two-stage process. First, source code
is compiled to Microsoft intermediate language (MSIL) code using a .NET Framework-compatible
compiler, such as that for Visual Basic .NET or Visual C#. Second, MSIL code
is compiled to native code.
with Microsoft Internet Information Services (IIS), can authenticate user
credentials such as names and passwords using any of the following authentication
\u2022Microsoft Passport authentication
\u2022Client Certificate authentication
the script will be executed by the server and interpreted as needed. ASP doesn\u2019t have some of the
functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or
VC++. Client side scripting means that the script will be executed immediately in the browser such as form
the HTML page, then anyone can see the code by viewing the page source. Also a possible security
hazards for the client computer.
on the automatic state management feature that enables server controls to re-populate their values on a
round trip without requiring you to write any code. This feature is not free however, since the state of a
control is passed to and from the server in a hidden form field. You should be aware of when ViewState is
helping you and when it is not. For example, if you are binding a control to data on every round trip (as in the
datagrid example in tip #4), then you do not need the control to maintain it\u2019s view state, since you will wipe
out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it,
set the EnableViewState property of the control to false.
content is of the requested page. Data can be persist accros the pages using Context.Item collection, which
is one of the best way to transfer data from one page to another keeping the page state alive.
Response.Dedirect() :client know the physical loation (page name and query string as well). Context.Items
loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a
user to a new Web page, the only option we had was Response.Redirect. While this method does
accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes
each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional
integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of
code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds,
This action might not be possible to undo. Are you sure you want to continue?