MIT4021– C# and .Net

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :

  “ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )




[ SPRING, 2016 ] ASSIGNMENT


PROGRAM
Master of Science in Information Technology(MSc IT)Revised Fall 2011
SEMESTER
4
SUBJECT CODE & NAME
MIT4021– C# and .Net
CREDITS
4
BK ID
B1187
MARKS
60


Note: Answer all the questions.

Question.1. Explain the steps to execute C# programs using visual studio IDE.

Answer:There are different ways for this:

1.Building C# Applications Using csc.exe

While it is true that you might never decide to build a large-scale application using nothing but the C# command-line compiler, it is important to understand the basics of how to compile your code files by hand.


Question.2. Explain the following in context of methods in C# with the help of examples:
1. Invoking methods
2. Nesting of methods

Answer:For writing a nested function in C#, we would make use of delegates and anonymous functions. A delegate is nothing but a "function pointer". And an anonymous function is a function/method without a name. Below, we are declaring a delegate which will point to an anonymous function.



A) Invoking methods

The keyword static implies that only one instance of the member exists for a class. Static variables are used for defining constants because their values can be retrieved by invoking the class without creating an instance of it. Static variables can be initialized outside the member function or class definition. You can also


B) Nesting of methods

Nesting of Methods

·         If a method in java calls a method in the same class it is called Nesting of methods. When a method calls the method in the same class dot(.) operator is not needed.
·       A method can call more than



Question.3. What do you mean by members in C#? Explain constant members and read only members also explain properties in C#.

Answer: Classes and structs have members that represent their data and behavior. A class's members include all the members declared in the class, along with all members (except constructors and destructors) declared in all classes in its inheritance hierarchy. Private members in base classes are inherited but are not accessible from derived classes.

The following table lists the kinds of members a class or struct may contain:

Member
Description




Question.4. How to handle exception in C#. Explain the syntax with an example.

Answer:Exceptions are unforeseen errors that happen in your programs. Most of the time, you can, and should, detect and handle program errors in your code. For example, validating user input, checking for null objects, and verifying the values returned from methods are what you expect, are all examples of good standard error handling that you should be doing all the time.




Question.6. Elaborate the steps for the following:
·       Creating the show.aspx page

Answer : To add a page with code separation to the Web site

1.       Close the Default.aspx page. To do this, right-click the tab with the file name in it and then click Close.
2.       In Solution Explorer, right-click the Web site (for example, C:\BasicWebSite) and then click Add New Item.
3.       Under Installed Templates, click Visual Basic or Visual C# and then select Web Form from the list.



·         Adding code to the show.aspx page
Answer :  An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page class.
The following code example shows an ASP.NET Web Forms page with an embedded code block that displays the results of a loop.
C#
<%@ Page Language="C#" %>
<html>
 
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :

  “ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )

 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.