.NET Questions

Q:

What is the DataContext class and how is it related to LINQ?

Answer

After you add a LINQ to SQL Classes item to a project and open the O/R Designer, the empty design surface represents an empty DataContext class ready to be configured. The DataContext class is a LINQ to SQL class that acts as a conduit between a SQL Server database and the LINQ to SQL entity classes mapped to that database. This class contains the connection string information and the methods for connecting to a database and manipulating the data in the database. It is configured with connection information provided by the first item that is dragged onto the design surface.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2954
Q:

What is the purpose of reserved word using in C#?

Answer

A keyword that specifies that types in a particular nemespace can be referred to without requiring their full qualified type names. 'using' reserved word always come with namespaces. eg. using systems so because of this useful classes supplied by Microsoft which are contained by system namespace are availble for user.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2925
Q:

Describe how to step through code in .NET.

Answer

Steps to step through the code in .NET:



  1. Start the program in debug mode.

  2. When the first breakpoint is reached then step through can be done in one of the two ways:



  •  Press F10 to move to next line.

  •  Select debug menu and click on step over. This would step over the breakpoint to next level.


       3. Other options are: “Step Into” and “Step Out”.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

1 2921
Q:

List different ways of deployment that are supported by .NET Framework 4.0.

Answer

       => Windows Installer

       => ClickOnce

       => XCOPY

       => Copy Web Site

       => Publish Web Site tool

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2895
Q:

What is an assembly?

Answer

Assemblies are the basic building blocks required for any application to function in the .NET realm. They are partially compiled code libraries that form the fundamental unit of deployment, versioning, activation scoping, reuse, and security. Typically, assemblies provide a collection of types and resources that work together to form a logical unit of functionality. They are the smallest deployable units of code in .NET. Compared to the executable files assemblies are far more reliable, more secure, and easy to manage. An assembly contains a lot more than the Microsoft Intermediate Language (MSIL) code that is compiled and run by the Common Language Runtime (CLR). In other words, you can say that an assembly is a set of one or more modules and classes compiled in MSIL, and metadata that describes the assembly itself, as well as the functionalities of the assembly classes.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2824
Q:

Mention the two major categories that distinctly classify the variables of C# programs.

Answer

Variables that are defined in a C# program belong to two major categories: value type and reference type. The variables that are based on value type contain a value that is either allocated on a stack or allocated in-line in a structure. The variables that are based on reference types store the memory address of a variable, which in turn stores the value and are allocated on the heap. The variables that are based on value types have their own copy of data and therefore operations done on one variable do not affect other variables. The reference-type variables reflect the changes made in the referring variables.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2821
Q:

What is Language Integrated Query (LINQ)?

Answer

LINQ is a programming model that is the composition of general-purpose standard query operators that allow you to work with data, regardless of the data source in any .NET based programming language. It is the name given to a set of technologies based on the integration of query capabilities into any .NET language.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2743
Q:

Which among the following validators allows checking if data of one control match with other control?

A) RangeValidator B) CompareValidator
C) RequiredFieldValidator D) None
 
Answer & Explanation Answer: B) CompareValidator

Explanation:

CompareValidator  allows checking if data of one control match with other control

Report Error

View Answer Report Error Discuss

Filed Under: .NET
Job Role: Software Architect

1 2675