Why is the virtual keyword used in code?

The virtual keyword is used while defining a class to specify that the methods and the properties of that class can be overridden in derived classes.

Advertisements

Generics

The need to create class that can work with any type of data is increasing. Generics allow you to define type-safe data structures, without committing to actual data types. By using Generics, you get to reuse data processing algorithms without duplicating type-specific code. Generics, when compared to inheritance, can increase type safety and reduce casting and boxing. Generic …

Continue reading Generics

What is the difference between arrays and collection?

Array: You need to specify the size of an array at the time of its declaration. It cannot be resized dynamically. The members of an array should be of the same data type. Collection: The size of a collection can be adjusted dynamically, as per the user's requirement. It does not have fixed size. Collection …

Continue reading What is the difference between arrays and collection?

URL Routing in ASP.NET 4

Normally when you access a web page, you use a URL that is the physical path of the page. URL routing is a way to provide your own URL instead of the physical path. ASP.NET 4.0 provides us with a simple and strong way to handle URL routing. ASP.NET 4.0 router enables to define any …

Continue reading URL Routing in ASP.NET 4