What is variable and constant in .NET programming language?

Variable: A variable is a data storage location in the computer memory that contains a value and has a meaningful name. Every variable is attached to a data type which determines what type of value can be stored in the variable. Variables can be declared by using the following syntax: ; Constant: Constant is also … Read more

How can you identify that the page is post back?

There is a property, named as “IsPostBack” property. You can check it to know that the page is post backed or not. In a .NET interview, if you’re asked how to identify whether a page is a postback, you would typically mention the following: In ASP.NET, a postback occurs when the client sends data back … Read more

What is Garbage collection?

Garbage collection is used to prevent memory leaks during execution of programs. There is a low-priority process name as garbage collector manages the allocation and deallocation a memory for applications. It also checks for the unreferenced variables and objects. If there is ny object which is no further used by application the Garbage collector frees … Read more

Explain the Code Access Security (CAS) in .NET framework

.NET security model is used to prevent unauthorized access of resources and operations and also restrict the codes to perform particular tasks. Code Access Security is a part of that .NET security. Code Access Security (CAS) in the .NET Framework is a security model that helps protect resources and operations from unauthorized access. It provides … Read more

What is the difference between dispose() and finalize()?

Although Dispose and Finalize both methods are used by CLR to perform garbage collection of runtime objects of .NET applications but there is a difference between them. The Finalize method is called automatically by the runtime while the Dispose method is called by the programmer. In .NET, Dispose() and Finalize() are both methods used for … Read more