Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
Which of the following are valid .NET CLR JIT performance counters?
1. Total memory used for JIT compilation
2.Average memory used for JIT compilation
3.Number of methods that failed to compile with the standard JIT
4.Percentage of processor time spent performing JIT compilation
5.Percentage of memory currently dedicated for JIT compilation
(A) 1, 2
(B) 1, 5
(C) 3, 4
(D) 4, 5
Ques 2 :
Convert vs. Parse methods
(A) Convert converts the value, Parse is for parsing
(B) Convert allows null values, Parse cannot
(C) Both are same
(D) None of these
Ques 3 :
Different ways a method can be overloaded in C#.NET
(A) Different parameter data types
(B) Different order of parameters
(C) Different number of parameters
(D) All of above
Ques 4 :
Which of the following statements is correct about the C#.NET code snippet given below?
namespace PskillsConsoleApplication
{
class Sample
{
public int func()
{
return 1;
}
public Single func()
{
return 2.4f ;
}
}
class Program
{
static void Main(string[ ] args)
{
Sample s1 = new Sample();
int i;
i = s1.func();
Single j;
j = s1.func();
}
}
}
(A) func() is a valid overloaded function.
(B) func() cannot be considered overloaded because: return value cannot be used to distinguish between two overloaded functions.
(C) Overloading works only in case of subroutines and not in case of functions.
(D) The call j = s1.func() will assign 2.4 to j.
Ques 5 :
Boxing in .Net allows the user to convert
(A) a double type to interger
(B) a interger type to double
(C) a value type to a reference type
(D) a reference type to a value type
Ques 6 :
Code that targets the Common Language Runtime is known as
(A) Legacy
(B) Managed Code
(C) Unmanaged
(D) Native Code
Ques 7 :
int keyword targets to which .Net type?
(A) System.Int8
(B) System.Int16
(C) System.Int32
(D) System.Int64
Ques 8 :
Which of following is correct
(A) enum Day{Sunday= 01,Monday= 02,Tuesday= 03,Wednesday=04,Thursday= 05,Friday= 06,Saturday=07}
(B) Day{Sunday= 01,Monday= 02,Tuesday= 03,Wednesday=04,Thursday= 05,Friday= 06,Saturday=07}
(C) enumeration Day{Sunday= 01,Monday= 02,Tuesday= 03,Wednesday=04,Thursday= 05,Friday= 06,Saturday=07}
(D) Day enum{Sunday= 01,Monday= 02,Tuesday= 03,Wednesday=04,Thursday= 05,Friday= 06,Saturday=07}
Ques 9 :
Which file contains configuration data for each unique URl resource used in project?
(A) web.config
(B) global.asax
(C) webapplication.vsdisco
(D) assemblyinfo.cs
Ques 10 :
Your company uses Visual Studio .NET as its application development platform. You have recently finished development of a class named ShopList using the .NET Framework. The class will include ShopItem objects that have the public properties exhibit below:
1. Name
2. ID
3. DiscountCode
You need to enable users of the class to iterate through the ShopList collection, and to list each product's name and ID using the foreach statement. Which of the following code segments will you use to accomplish this task?
(A) public class ShopList : IEnumerator, IEnumerable { // Class implementation }
(B) public class ShopList : IBindingList { // Class implementation }
(C) public class ShopList : ICollection { // Class implementation }
(D) public class ShopList : IDictionary { // Class implementation }
Ques 11 :
What does Dispose method do with connection object?
(A) Close the connection
(B) Temporary dispose the connection
(C) Deletes it from the memory
(D) All of the above
Ques 12 :
Which of the following is/are true about the structure?
(A) Structures do not support Inheritance
(B) Structures are value type
(C) Structures can not have contractor
(D) All of the above are true
Ques 13 :
Which of the following are not types of access modifiers in C#?
(A) external protect
(B) internal protect
(C) protect
(D) internal
Ques 14 :
Which of the following statements are correct about a .NET Assembly?
1. It is the smallest deployable unit.
2. Each assembly has only one entry point - Main(), WinMain() or DLLMain().
3. An assembly can be a Shared assembly or a Private assembly.
4. An assembly can contain only code and data.
5. An assembly is always in the form of an EXE file.
(A) 1, 3, 5
(B) 1, 2, 3
(C) 2, 4, 5
(D) 1, 2
Ques 15 :
Which of the following statements are correct about static functions?
1. Static functions can access only static data.
2. Static functions cannot call instance functions.
3. It is necessary to initialize static data.
4. Instance functions can call static functions and access static data.
5. This reference is passed to static functions.
(A) 1, 2, 3
(B) 1, 2, 5
(C) 1, 2, 4
(D) 2, 3, 5
Ques 16 :
What object can help you maintain data across users?
(A) Session object
(B) Server Object
(C) Response Object
(D) Application Object
Ques 17 :
Can an Interface be instantiated directly?
(A) Yes
(B) No
Ques 18 :
Which of the following constitutes the .NET Framework?
1. ASP.NET Applications
2. CLR
3. Framework Class Library
4. WinForm Applications
5. Windows Services
(A) 2, 5
(B) 2, 1
(C) 2, 3
(D) 3, 4
Ques 19 :
Which of the following statements is correct about constructors?
(A) Static constructors can use optional arguments.
(B) Overloaded constructors cannot use optional arguments.
(C) If we provide a one-argument constructor then the compiler still provides a zero-argument constructor.
(D) If we do not provide a constructor, then the compiler provides a zero-argument constructor.
Ques 20 :
A master page is merged with a content page ________ in the page execution life cycle
(A) Very early
(B) Very late
(C) Early
(D) Late
Submit Answer
Don't Refresh the Page !! ...