-
which is not cls compliant built in value type?
intushortdecimalenum
-
-
-
-
-
-
-
-
-
-
Does C# support properties of array types?
Yes. Here's a simple example: using System;class Class1 {private string[] MyField;public string[] MyProperty {get { return MyField; }set { MyField = value; }}}class MainClass{public static int Main(string[] args) {Class1 c = new Class1();string[] arr = new string[] {"apple", "banana"};c.MyProperty = arr;Console.WriteLine(c.MyProperty[0]); // "apple"return 0;}}
-
How do destructors and garbage collection work in C#?
C# has finalizers (similar to destructors except that the runtime doesn't guarantee they'll be called), and they are specified as follows: class C{~C(){// your code}public static void Main() {}}Currently, they override object.Finalize(), which is called during the GC process.
-
My switch statement works differently! Why?
C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x){case 0:// do somethingcase 1:// do something in common with 0default:// do something in common with//0, 1 and everything elsebreak;}To achieve the same effect in C#, the code must be modified as shown below (notice how the control flows are explicit): class Test{public...
-
Why does DllImport not work for me?
All methods marked with the DllImport attribute must be marked as public static extern.
-
How long is a SessionID guaranteed to be unique?
A. It is unique for the web server, whether it is restarted or not. B. Only until the web server is restarted. C. It is like a GUID in that it is for any web server at any time. D. Only until the session expires, then it can be reissued to another client. E. It is unique per client. A client cannot have two sessions with the same SessionID
-
When does the application OnEnd event handler fire?
A. After every request for an application document, since web servers are stateless servers. B. As soon as there are no open connections to any application document. C. When the web server is stopped in an orderly fashion. D. Twenty minutes after the last request for a document in the application. E. When there are no application requests for the amount of time defined by the SessionTimeout variable....
-
How are sessions maintained?
A. The browser sends a cookie to the server with each request. B. The browser sends a Querystring variable to the server with each request. C. The browser sends a hidden Form variable to the server with each request. D. The browser sends a long variable to the server in the BODY of each request. E. None of the above.
-
What does the above code accomplish?">
<% Response.Redirect("http://www.sql.com") %> What does the above code accomplish?
A. It sends the browser the line of sample code, and the browser executes it. B. It sends the response to "http://www.matsystems.com" instead of to the Requesting browser. C. It sends a redirection header back to the browser, and the browser then requests the new target document. D. The redirection occurs on the server-side, and the first response the browser gets is the head and body of the new target...
-
<%Else>
<!-- #INCLUDE FILE="FunctionTwo.inc"-->
<%End If>
What would the above code load?"><%@ Language=VBScript %> <%If false then> <!-- #INCLUDE FILE="FunctionOne.inc"--> <%Else> <!-- #INCLUDE FILE="FunctionTwo.inc"--> <%End If> What would the above code load?
A. Only the FunctionTwo.inc file into the ASP page. B. Both files, since Server Side Includes are processed before ASP interpreting. C. Only the FunctionOne.inc file into the ASP page. D. Neither file, since Server Side Includes are processed before ASP interpreting. E. Neither file, since the #INCLUDE statements are commented out.