Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
What is the difference between Convert.ToString(str) and str.ToString() method?
(A) Convert.ToString(str) function handles NULL while str.ToString() does not. It will throw a NULL reference exception.
(B) str.ToString() function handles NULL while Convert.ToString(str) does not. It will throw a NULL reference exception.
(C) Both can handle NULL
(D) None can Handle NULL
Ques 2 :
If a class is using an interface, it must
(A) contain the same methods as the interface
(B) inherit the properties of the interface
(C) create an interface object
(D) all of the above
Ques 3 :
You need to identify a type that meets the following criteria: Is always a number Is not greater than 65,535 Which type should you choose?
(A) System.UInt16
(B) System.IntPtr
(C) Int
(D) System.String
Ques 4 :
Are private class-level variables can inherited?
(A) Yes, and we can access them
(B) No, and we can not access them
(C) Yes, but we can not access them
(D) All of the above are wrong
Ques 5 :
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 6 :
Which of the following ways to create an object of the Sample class given below will work correctly?
class Sample
{
int i;
Single j;
double k;
public Sample (int ii, Single jj, double kk)
{
i = ii;
j = jj;
k = kk;
}
}
(A) Sample s3 = new Sample(10, 1.2f, 2.4);
(B) Sample s2 = new Sample(10, 1.2f);
(C) Sample s1 = new Sample(, , 2.5);
(D) Sample s1 = new Sample(10);
Ques 7 :
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
Ques 8 :
How to kill a user session explicitly?
(A) Session.Discard()
(B) Session.Close()
(C) Session.Abandon()
(D) Session.kill()
Ques 9 :
The company uses Visual Studio .NET as its application development platform. You are creating a strong named MyAssembly that will be used in several applications. The assembly will be rebuilt frequently during the development cycle. You must ensure that every time MyAssembly is rebuilt it works properly with all applications that use it. You are required to configure the computer on which you develop the assembly such that each application uses the latest build of MyAssembly. Which of the following actions will you take to accomplish the task?
(A) Add the following element to the configuration file of every application that uses the assembly
(B) Add the following element to the machine configuration file
(C) To point to the build output directory for the strong named assembly, create a DEVPATH environment variable.
(D) B and C
Ques 10 :
In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?
(A) TestFixtureAttribute
(B) TestClassAttribute
(C) TestAttribute
(D) NUnitTestClassAttribute
Ques 11 :
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 12 :
What is the wild card character in the SQL "like" statement?
(A) * (Asterisk)
(B) # (Pound)
(C) % (Percent)
(D) $ (Dollar)
Ques 13 :
Which of the following statements are correct about the C#.NET code snippet given below?
class Sample
{
static int i;
int j;
public void proc1()
{
i = 11;
j = 22;
}
public static void proc2()
{
i = 1;
j = 2;
}
static Sample()
{
i = 0;
j = 0;
}
}
(A) j can be initialized in proc2().
(B) i cannot be initialized in proc1().
(C) proc1() can initialize i as well as j.
(D) proc2() can initialize i as well as j.
Ques 14 :
The uniqueId that gets generated at the start of the Session is stored in
(A) Client computer as a cookie
(B) Server machine
(C) Passed to and fro on each and every request and response
(D) Both a and b are correct
Ques 15 :
What is boxing?
(A) Encapsulating a value type in an object.
(B) Encapsulating an object in a value type.
(C) Encapsulating a copy of a value type in an object.
(D) Encapsulating a copy of an object in a value type.
Ques 16 :
Which of the following jobs are done by Common Language Runtime?
1. It provides core services such as memory management, thread management, and remoting.
2. It enforces strict type safety.
3. It provides Code Access Security.
4. It provides Garbage Collection Services.
(A) Only 1 and 2
(B) Only 3, 4
(C) Only 2, 3 and 4
(D) All of the above
Ques 17 :
In data reader, what can be used before read method?
(A) Getvalue
(B) Getstring
(C) GetNumber
(D) None
Ques 18 :
What is ENUM?
(A) It is used to initialize variables
(B) It is used to define constants
(C) It is used to define variables
(D) None
Ques 19 :
Which of the following namespaces used in C#.NET?
(A) using System;
(B) using System.Collections.Generic;
(C) using System.Windows.Forms;
(D) All of the above are used
Ques 20 :
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
Submit Answer
Don't Refresh the Page !! ...