Time remaining
:
:
Test Status
CSHARPRANDOMTEST
Ques 1 :
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 2 :
Is it possible to change the value of a variable while debugging a C# application?
(A) Yes
(B) No
Ques 3 :
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 4 :
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 5 :
Which is true about Interface and abstract methods?
(A) We can write only one abstract method inside interface.
(B) No method is abstract inside interface
(C) All the methods inside Interface in an abstract method.
(D) None of the above
Ques 6 :
Which of the following are NOT true about .NET Framework?
1. It provides a consistent object-oriented programming environment whether
object code is stored and executed locally, executed locally but Internet-
distributed, or executed remotely.
2.It provides a code-execution environment that minimizes software deployment and versioning conflicts.
3.It provides a code-execution environment that promotes safe execution of code, including code created by an
unknown or semi-trusted third party.
4.It provides different programming models for Windows-based applications and Web-based applications.
5.It provides an event driven programming model for building Windows Device Drivers.
(A) 1, 2
(B) 2, 4
(C) 4, 5
(D) 1, 2, 4
Ques 7 :
In C#, by default structs are passed how?
(A) By reference.
(B) By value.
(C) By address.
(D) By memory.
Ques 8 :
Your company uses Visual Studio.NET 2005 as its application development platform. You are developing an application using the .NET Framework 2.0. You are required to use a datatype that will store only numbers ranging from -32,768 to 32,767. Which of the following datatypes will you use to accomplish the task?
(A) short
(B) System.Int16
(C) string
(D) a and b
Ques 9 :
Which of the following .NET components can be used to remove unused references from the managed heap?
(A) Class Loader
(B) Garbage Collector
(C) CTS
(D) CLR
Ques 10 :
Sealed Classes cannot be a base class.
(A) True
(B) False
Ques 11 :
Is there any errors in this -> EmployeeMgmt constructor: Public int EmployeeMgmt { emp_id = 100; }
(A) Return type
(B) Formal parameters
(C) No errors
(D) Name
Ques 12 :
The RangeValidator control supports the following data types
(A) Integer only
(B) Date, Integer and String
(C) only string
(D) Date and Integer
Ques 13 :
What is the wild card character in the SQL "like" statement?
(A) * (Asterisk)
(B) # (Pound)
(C) % (Percent)
(D) $ (Dollar)
Ques 14 :
Which of these statements correctly declares a two-dimensional array in C#?
(A) int[][] myArray;
(B) int[,] myArray;
(C) System.Array[2] myArray;
(D) int[2] myArray;
Ques 15 :
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 16 :
Managed methods will be marked as ------------ in MSIL code
(A) mscorjit
(B) cil
(C) dgclr
(D) None
Ques 17 :
Which of the following jobs are NOT performed by Garbage Collector?
1.Freeing memory on the stack.
2.Avoiding memory leaks.
3.Freeing memory occupied by unreferenced objects.
4.Closing unclosed database collections.
5.Closing unclosed files.
(A) 1, 2, 3
(B) 1, 4, 5
(C) 3, 5
(D) 3, 4
Ques 18 :
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 19 :
What property is used on the datatable to indicate conflicts after update method is called?
(A) HasCollision
(B) HasErrorConflict
(C) HasError
(D) HasDataError
Ques 20 :
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
Submit Answer
Don't Refresh the Page !! ...