Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call
us at : 08263069601
ASSIGNMENT
PROGRAM
|
Master of Science in Information
Technology(MSc IT)Revised Fall 2011
|
SEMESTER
|
4
|
SUBJECT CODE & NAME
|
MIT4021– C# and .Net
|
CREDIT
|
4
|
BK ID
|
B1287
|
MAX.MARKS
|
60
|
Note:
Answer all questions. Kindly note that answers for 10 marks questions should be
approximately of 400 words. Each question is followed by evaluation scheme.
1
What is Common Language Runtime (CLR)? List the services that CLR provide.
Answer: The Common Language Runtime (CLR)
is programming that manages the execution of programs written in any of several
supported languages, allowing them to share common object-oriented class es
written in any of the languages. The Common Language Runtime is somewhat
comparable to the Java Virtual Machine that Sun Microsystems furnishes for
running programs compiled from the Java language. Microsoft refers to its
Common Language Runtime as a "managed execution environment." A
program compiled for the CLR does not need a language-specific execution
environment and can easily be moved to and run on any system with Windows 2000
or Windows XP.
Programmers writing in any of Visual Basic,
Visual C++, or C# compile their programs into an intermediate form of code
called Common
2
Explain (a) Assignment Operators (b) Bitwise Operators.
Answer: The assignment operator, '=', is
the operator used for assignment. Like most other operators in C++, it can be
overloaded.
= Operator
^= Operator
*= Operator
/= Operator
3
Explain different decision making statements used in C#.
Answer:
The
if-statement: The if statement is used to check the condition is true or false.
For
example:
if(score == 100)
{
// Any code between the curly braces gets executed by the program only
when
// the condition in the parentheses is true.
Console.WriteLine("Perfect score!
You win
4
What is a structure in C#? Explain with an example.
Answer: A structure is a value type. The
type is defined with the struct keyword. Structures are very similar to the
classes; they differ in some aspects. Structures are meant to represent
lightweight objects like Point, Rectangle, Color and similar. In many cases, structures
may be more efficient than classes. Structures are value types and are created
on the stack. Note that primitive data types like int, bool, float are
technically struct types.
All struct types inherit from
System.ValueType and further from System.Object. Structures are never abstract
and they are always implicitly sealed. So struct
5
What is hiding a method? Explain.
Answer: Method hiding in C# is similar to
the function overriding feature in C++. Functions of the base class are
available to the derived class. If the derived class is not happy, one of the
functions available to it from the base class can define its own version of the
same function with the same function signature, just differing in
implementation. This new definition hides the base class definition. Take the
following program for example.
class BC
6
What is an event? Explain with example.
Answer: Events are declared using
delegates.Events are the higher level of Encapsulation over delegate.
A delegate that exists in support of an
event is called as an event handler. Event handlers are methods in an object
that are executed in response to some events occurring in the application.
Syntax of an Event Handler using delegate:
Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call
us at : 08263069601
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.