Anda di halaman 1dari 6

.

Net Module Test -1



Q.1. which of the following statement is true?
A. The CLS helps enhance and ensure language interoperability by
defining a set of features that developers can rely on to be available in
a wide variety of languages.
B. CTS defines how data types are declared, used, and managed in the
runtime, and is also an important part of the CLR 's support for cross-
language integration.

a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.2. Which of the following statement is true?
A. Namespaces: are naming schemes that helps organize the various
classes available to our application so that they are more easily found.
B. Namespaces: are the collection of class under one group.

a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.3. Which of the following statement is true?
Statement A: .NET Framework provide a consistent object-oriented
programming environment whether object code is stored and executed
locally, executed locally but Internet-distributed, or executed remotely.
Statement B: .NET Framework provides a code-execution environment
that minimizes software deployment and versioning conflicts.

a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.4. which of the following is not correct in function overloading in
compare to other functions
a) void sum()
{}
b)void sum(int num1)
{}
c)static sum(int num1)
{}
d)void sum(int num1, int num2)
{}

Q.5. A Static Constructor are executed only once in life time of
application.
B. Constructors should have a same name as class name.
a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.6. Which of the following is not a C# reserved keyword
a) Is
b) int
c) In
d) Of
Q.7.which of these command options are used to compile to library
file(Dll File)
a) csc hello.cs
b) csc /t:library Hello.cs
c) csc /r hello.cs
d) csc hello.dll

(we use csc /r:mylib.dll main.cs for compiling cs to exe using
dll.. also /t means target and /r means reference)
Q.8. which of these are right way to declare the constructor for the
class camera
a) public camera()
b) public void camera()
c) public bool camera()
d) public camera camera()
Q.9. which of the following options does not allow a class to be
instantiated
a) Abstract
b) dynamic
c) Sealed
d) Virtual
Q.10.which of the following is true with respect to parameter Array
A. A function can have more than one parameter array.
B. Parameter Array should always be the last parameter of the function.
a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Example: public void myfun( params string[] c)
{
}
Q.11.which of the following options of the function is used to return more than
one value.
a) return
b) ref
c) out
d) val

example:
int m,n;
myfunc(out m, out n);
public void myfunc(out int a,out int b)
{
a=10;
b=5;
}
Q.12. A. C# Properties can be made only with getBlock
B. Set block is used to assign the value.
a) Statement A is true and B is false.
b) Statement B is true and A is false. (this is incorrect coz of read
only properties,, where we can have only get block)
c) Both the statements are false.
d) Both the statements are true.

Q.13. A class can have more than one destructor
B Destructor cannot have a parameter
a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.14. The correct syntax for defining a delegate is:
A. delegate {MyMethod( int y) }
B. delegate void MyMethod(int y) ;
C. delegate MyMethod (int y)
D. delegate {void MyMethod(int y);
Q.15. A Interface members are private by default.
B. Interfaces can be instantiated.
a) Statement A is true and B is false.
b) Statement B is true and A is false.
c) Both the statements are false.
d) Both the statements are true.

Q.16. _______________ is the capability to take two classes and
merge them into single class at runtime.
a) Static Class
b) Sealed Class
c) Partial Class
d) Instance Class

Q.17. Which of the following in c# represents a dynamically sized,
index-based collection of objects?

a. Array class
b. ArrayList class
c. HashTable class
d. None of the Above

Q.18. The ability to define properties, methods, or procedures that
have the same name but use different data types is called

a. Exception Handling
b. Overloading
c. Constructors
d. None of the Above

Q.19. Which of the following command is used to inspect the Types
present in an assembly

a) Csc /Inspect
b) Ildasm
c) Ilasm
d)None of the Above

Anda mungkin juga menyukai