0% found this document useful (0 votes)
24 views6 pages

C#. Net Back

The document contains a series of questions and explanations related to the .NET Framework and C# programming concepts. It covers topics such as the purpose of .NET, CLR, MSIL, object-oriented principles, encapsulation, inheritance, GUI controls, exception handling, and various C# features. Additionally, it includes questions on specific controls, properties, and the architecture of .NET and C#.

Uploaded by

therhs101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

C#. Net Back

The document contains a series of questions and explanations related to the .NET Framework and C# programming concepts. It covers topics such as the purpose of .NET, CLR, MSIL, object-oriented principles, encapsulation, inheritance, GUI controls, exception handling, and various C# features. Additionally, it includes questions on specific controls, properties, and the architecture of .NET and C#.

Uploaded by

therhs101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

No.

1. What is the main purpose of .NET Framework?


a) To compile Java programs
b) To provide a platform for running applications on different operating systems
c) To provide an environment for developing and running .NET
applications
d) To act as an alternative to databases

2. Which of the following is the correct full form of CLR?


a) Common Language Runtime
b) Computer Language Resource
c) Common Language Resource
d) Central Language Runtime

3. What is MSIL in .NET?


a) Microsoft System Intermediate Language
b) Microsoft Structured Intermediate Language
c) Microsoft Software Intermediate Language
d) Microsoft Intermediate Language

4. Which of the following is NOT an object-oriented programming principle?


a) Encapsulation
b) Inheritance
c) Compilation
d) Polymorphism

5. What is encapsulation in C#?


a) Wrapping data and functions into a single unit
b) Creating multiple instances of a class
c) Allowing multiple methods to have the same name
d) Running multiple processes simultaneously

6. Which keyword is used to define an abstract class in C#?


a) abstract
b) sealed
c) virtual
d) interface

7. Which of the following is a common GUI control in Windows Forms?


a) Label
b) Button
c) TextBox
d) All of the above
8. Which event occurs when a user clicks a button in Windows Forms?
a) Click
b) Load
c) KeyPress
d) Hover

2) Explain architecture of .NET Framework with a neat diagram.


3)What is Exception? Explain the importance of try, catch and finally.
1) Explain inheritance with suitable examples.

5) Explain value type &reference types


6) Explain any two form controls with properties &Event.
7) Explain datatypes in C#.
2)Explain Features of C#.
3) Explain concept of boxing and unboxing
4) Explain Sealed Class.

*****
1. Which of the following properties is used to change the text displayed on a button
in Windows Forms?
a) Caption
b) Name
c) Text
d) Label

2. Which control is used for selecting a single option from multiple choices in
Windows Forms?
a) RadioButton
b) CheckBox
c) ListBox
d) TextBox

3. Which of the following controls can be used to select multiple items?


a) ListBox
b) ComboBox
c) RadioButton
d) Label

4. Which of the following best describes polymorphism?


a) One class inheriting from another
b) Defining multiple methods with the same name but different
parameters
c) Hiding implementation details from the user
d) Creating multiple objects from a single class

5. Which keyword is used to inherit a class in C#?


a) extends
b) implements
c) base
d) :

6. Which of the following is an example of multiple inheritance in C#?


a) A class implementing multiple interfaces
b) A class inheriting from two base classes
c) A class using multiple constructors
d) A class containing multiple methods

7. Which of the following is NOT a component of .NET?


a) CLR
b) CLS
c) JVM
d) CTS

8. Which type of code does the .NET compiler generate?


a) Native code
b) Intermediate Language (IL) code
c) Assembly code
d) Machine code

2) Define multilevel inheritance. Explain with suitable examples.

3) Explain the role &working of CLR with a neat diagram.

1) Explain IDE in C#.

4) Explain command line arguments.

5) Explain Sealed class.

1) Which are the features of C#.

2) Explain branching statements in C#.

3) Explain Partial class.

6) Write any four properties of List Box control.


1. What is the role of the JIT compiler in .NET?
a) It translates high-level language code to assembly language
b) It converts MSIL code to native machine code at runtime
c) It optimizes C++ programs
d) It is used for debugging only

2. Which .NET component ensures type safety and memory management?


a) Common Language Runtime (CLR)
b) Common Type System (CTS)
c) Common Language Specification (CLS)
d) Garbage Collector

3. Which keyword is used to declare a constant variable in C#?


a) static
b) const
c) final
d) readonly

4. What is the purpose of an interface in C#?


a) To provide default method implementations
b) To allow multiple inheritance
c) To enforce method signatures that must be implemented by a class
d) To restrict access to certain methods

5. Which of these is a valid example of method overloading?


a) Two methods with the same name but different parameters
b) Two methods with the same name and parameters but different return types
c) Two methods with different names but the same parameters
d) Two methods with different names and return types

6. What is a sealed class in C#?


a) A class that cannot be inherited
b) A class that cannot be instantiated
c) A class that has no methods
d) A class that only contains static members

7. Which property of a TextBox control is used to make it read-only?


a) Locked
b) ReadOnly
c) Enable
d) Freeze

8. Which keyword is used to handle errors in C#?


a) error
b) exception
c) try-catch
d) handle
2) Explain Architecture of C# .Net.

3) Explain polymorphism in C#. Differentiate between method


overloading and method overriding with examples.

3) Explain the concept of value type and reference type.

4) Explain Get and Set properties of C#.

5) Explain Branching statements in C#.

6) Write any four properties of Text Box control.

1) Explain Classes &Object in C#.

2) Define Partial class. Define the use of it.

You might also like