Category: .Net

updated topic discussion in Mvc

—Route table,Action filter ,validation  and Budling(how to use or call) protected void Application_Start() { AreaRegistration.RegisterAllAreas();//Registers all the areas in ASP.NET MVC. //GlobalFilters.Filters.Add(new HandleErrorAttribute()); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters) ; RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //RegisterGlobalFilters(GlobalFilters.Filters); } ///Route class defined in app_start folder .it is config file. public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”);   // routes.MapRoute( //   name: “Default”, //   url: “{controller}/{action}/{id}”, //                   … Read more →

Web portal,web site,web application (project) difference

A web portal is most often one specially-designed Web page which brings information together from diverse sources in a uniform way. Usually, each information source gets its dedicated area on the page for displaying information (a portlet); Portals are becoming a very prevalent and efficient method of communicating information to individuals. There are primarily two types of portals: public and… Read more →

Array and Arraylist

–Array The Array class is not part of the System.Collections namespaces. However, it is still a collection because it is based on the IList interface. The rank of an Array object is the number of dimensions in the Array. An Array can have one or more ranks. The lower bound of an Array is the index of its first element.… Read more →

Dictionary ,Hashtable and HashSet

HashTable Represents a collection of key/value pairs that are organized based on the hash code of the key. Hashtable optimizes lookups. It computes an adding hash of each key. It then uses this hash code to look up the element very quickly. It is an older .NET Framework type. It is slower than the generic Dictionary type. Dictionary A dictionary… Read more →

Typeof operator,GetType method,as operator & Is operator

—Typeof operator and GetType Method Used to obtain the System.Type object for a type. A typeof expression takes the following form: System.Type type = typeof(int); To obtain the run-time type of an expression, we can use the .NET Framework method GetType, as in the following example: int i = 0; System.Type type = i.GetType(); The typeof operator cannot be overloaded.… Read more →

Design pattern

What Are Design Patterns and Do I Need Them? Software professionals may be familiar with the term “Design Patterns,” but many have no idea of where they come from and what they truly are. Consequently, some do not see the value and benefits design patterns bring to the software development process, especially in the areas of maintenance and code reuse.… Read more →

Delegate and constructor

Delegate is a reference type that holds the reference of a class method. Any method which has the same signature as delegate can be assigned to delegate. It is very similar to the function pointer but with a difference that delegates are a type-safe. We can say that it is the object-oriented implementation of function pointers. There are three steps… Read more →

Sealed,static and abstract class difference.

Sealed Class A sealed class cannot be used as a base class. Sealed classes are primarily used to prevent derivation. Because they can never be used as a base class, some run-time optimizations can make calling sealed class members slightly faster.   We can also use the sealed modifier on a method or property that overrides a virtual method or… Read more →

Constant,readonly and static discussion

Constant 1)      It is assigned a value at time of declaration but not modified at any time. By default constant is static, hence cannot define as static.const field is a compile time constant. It is fully evaluated at compile time.const keyword to built-in value types (byte, short, int, char, float, decimal etc.), enum, string or reference types which can be… Read more →