.NET Questions

Q:

What is the syntax to inherit from a class in C#?

Answer

When a class is derived from another class, then the members of the base class become the members of the derived class. The access modifier used while accessing members of the base class specifies the access status of the base class members inside the derived class.

The syntax to inherit a class from another class in C# is as follows:
class MyNewClass : MyBaseclass

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1992
Q:

Explain the validation controls. How many validation controls in ASP.NET 4.0?

Answer

Validation controls are responsible to validate the data of an input control. Whenever you provide any input to an application, it performs the validation and displays an error message to user, in case the validation fails.

ASP.NET 4.0 contains the following six types of validation controls:

   => CompareValidator - Performs a comparison between the values contained in two controls.
   => CustomValidator - Writes your own method to perform extra validation.
   => RangeValidator- Checks value according to the range of value.
   => RegularExpressionValidator - Ensures that input is according to the specified pattern or not.
   =>  RequiredFieldValidator - Checks either a control is empty or not.
   => ValidationSummary - Displays a summary of all validation error in a central location.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1992
Q:

What is ASP.NET?

Answer

ASP.NET is a specification developed by Microsoft to create dynamic Web applications, Web sites, and Web services. It is a part of .NET Framework. You can create ASP.NET applications in most of the .NET compatible languages, such as Visual Basic, C#, and J#. The ASP.NET compiles the Web pages and provides much better performance than scripting languages, such as VBScript. The Web Forms support to create powerful forms-based Web pages. You can use ASP.NET Web server controls to create interactive Web applications. With the help of Web server controls, you can easily create a Web application.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1962
Q:

In which namespace, all .NET collection classes are contained?

Answer

The System.Collections namespace contains all the collection classes.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1956
Q:

Explain the difference between value types and reference types

Answer

Value type :


 



  • Stores the data

  • The value of value types is stored on the managed stack

  • They are lighter objects 

  • One variable can have only one value


Reference Type :



  • Stores the reference to the data

  • A reference type is allocated on the heap

  • They are heavier objects

  • Several variables can reference the same data


 

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1931
Q:

Define authentication and authorization.

Answer

Authorization: The process of granting access privileges to resources or tasks within an


application.


Authentication: The process of validating the identity of a user.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 1909
Q:

What are standard query operators in LINQ?

Answer

The standard query operators in LINQ are the extension methods that form the LINQ pattern. These operators form an API that enables querying of any .NET array or collection. It operates on sequences and allows you to perform operations, such as determining if a value exists in the sequence and performing an aggregated function, such as a summation over a sequence.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 1880
Q:

How do you change the session time-out value?

Answer

The session time-out value is specified in the web.config file within sessionstate element.You can change the session time-out setting by changing value of timeout attribute of sessionstate element in web.config file.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET
Job Role: Software Architect

0 1877