IsNullOrEmpty method provides us with a good and relatively efficient method of checking whether a string is null or empty. For performance it may be better to use manual null checks. IsNullOrWhiteSpace is not ideal but is good. The method calls result in a small performance penalty. Further, the IsWhiteSpace method itself has some indirections that can be removed if you are not using Unicode data. Continue reading
Tracing mechanism in Windows Communication Foundation is based on the classes that resides in System.Diagnostic namespace.Important classes are Trace, TraceSource and TraceListener. Continue reading
Is ASP.NET MVC a replacement for WebForms? The answer is No.
ASP.NET MVC, is not a replacement for WebForms. Both ASP.NET MVC and ASP.NET WebForms are built on top of the Core ASP.NET Framework. In fact a lot of features we use in ASP.NET such as Roles, Membership, Authentication and a lot of namespaces, classes and interfaces can be used in an ASP.NET MVC application. Continue reading
1. Explain MVC (Model-View-Controller) in general?
MVC (Model-View-Controller) is an architectural software pattern that basically decouples various components of a web application. By using MVC pattern, we can develop applications that are more flexible to changes without affecting the other components of our application. Continue reading
Dependency Injection is process of removing dependency of object which creates the independent business objects. It is very useful for Test Driven Development. Continue reading
Difference between && and &
&& is called the AND operator and
& is also called the AND operator but the basic difference between them is in the way they are executed. The syntax for
& the same as in the following: Continue reading
List can be filtered using various methods like Linq
Where or using
List.Contains method but there are situations where you need some custom logic while filtering. Continue reading
y = x + moreValue;
y = x;
} Continue reading
- The ?? operator is called the null-coalescing operator
- It’s used to define a default value for nullable value types or reference types
- It returns the left-hand operand if the operand is not null Otherwise it returns the right operand.