1. Different ways a method can be overloaded in C#.
NET
Different parameter data types
Different number of parameters
Different order of parameters
>All of above
2 . What is the .NET collection class that allows an element to be accessed using a unique key?
>HashTable
ArrayList
SortedList
3. What does the keyword virtual mean in the method definition?
The method is public
The method can be derived
The method is static
>The method can be over-ridden
4. using or Imports statement
allows references to members of a namespace without using the fully qualified name
>use to reference an external library
both a and b
5. Difference between aggregation and association
6. what is the default time out for session?
a)10 min
>b)20min
c)30min
d)40min
7. Difference between Server.Transfer and Response.Redirect
8. int[] myarray=new int[10] what is the val of myarray[1]?
a)0
b)1
c)null
d)a null reference exception thrown
9. How can you sort the elements of the array in descending order?
a) By Calling ReverseSort(),
b) By Calling SortReverse(),
c) By Calling Descend(),
>d) By Calling Sort () and then Reverse()
10. which is an alternate name for a table,view,sequence,procedure,storage functions,packages or
another object?
a)datablock
b)synonym
c)view
d)none
ans:synonym
11. three types of policies…
User policy, enterprise policy, machine policy
Publisher policy, enterprise policy, user policy
12. what does the keyword virtual declare for methods or a property?
The method or a property can have a duplicate name with in the same assembly
The method or a property doesnot exist in the context of the object at design time
>The method or a property canbe overriden
none of the above
13.page life cycle methods (checkbox)
>Init()
Seal()
>Load()
14. Which one of the following is the type of assembly that contains localized resources?
Satellite
Shared
Hub
localized
Correct answer: Satellite
15. __________________ method(s) are used with Application object to ensure only one process
accesses a variable at a time.
Synchronize
ThreadLock
Sychronize()
Lock() and UnLock()
Correct: Lock() and UnLock()
16. ______________ is the DataType return in IsPostback property.
bit
boolean
int
object
string
Correct : Boolean
17. A valid comment block in ASP.NET is:
A: <!---comment---->
B: <!--comment -->
C: <%-- comment--%>
D: <%--comment-->
Answer--->C: <%-- comment--%>
18. Which of the following is true ?
(A) => User controls are displayed correctly in the Visual Studio .NET Designer
(B) => Custom controls are displayed correctly in VS.Net Designer
(C) => User and Custom controls are displayed correctly in the Visual Studio .NET Designer
Answer =>> Custom controls are displayed correctly in VS.Net Designer
19. What’s the difference between Response.Write() andResponse.Output.Write()?
(A) => Response.Output.Write() allows you to flush output
(B) => Response.Output.Write() allows you to buffer output
(C) => Response.Output.Write() allows you to write formatted output
Answer =>> Response.Output.Write() allows you to write formatted output
20. What is the significance of Server .MapPath
(A) => Returns the physical file path that corresponds to virtual specified path
(B) => Returns the Virtual Path of the web folder
(C) => Maps the specified virtual path to Physical path
Answer =>> Returns the physical file path that corresponds to virtual specified path
21. Does this code compile?
public interface MyInterface
{
string MyProp { get; }
}
a) Yes …......
b) No, because the interface name does not start wi
c) No, because MyProp is not declared as public
d) No, because interfaces can't contain property
22. Which of the following type conversions will be performed automatically by the compiler without
requiring an explicit cast?
a) int to long, …............
b) long to int,
c) double to float,
d) float to int
23. Whats the difference between System.String and System.StringBuilder classes?
a) System.String is not immutable,
b) System.StringBuilder is not mutable,
c) System.StringBuilder is mutable, -----
d) StringBuilder cannot allocate more memory as needed
24. What is the difference between interface and abstract class
a) Interface contain only methods,
b) Interface can't declare variables within it,
c) Interface contain only events,
d) All of the above ----
25. static void Main(string[] args)
{
string s1 = "foo";
System.Text.StringBuilder sb = new System.Text.StringBuilder("foo");
string s2 = sb.ToString();
OpTest<string>(s1, s2);
Console.ReadLine();
public static void OpTest<T>(T s, T t) where T : class
{
System.Console.WriteLine(s == t);
A) FALSE, …....
B) TRUE,
C) Run time error,
D) Compile-time error
26. Different ways a method can be overloaded in C#.NET
A) Different parameter data types,
B) Different number of parameters,
C) Different order ofparameters,
D) All of above-----------------------
27. CPUs can dynamically be added to a running system, by using ____________ feature
Cold Add CPU
Hot Add CPU
Dynamic add CPU
Passive add CPU
Hot Add CPU