Monday, December 10, 2012

How to iterate an Enum in C#?

            Array values = Enum.GetValues(typeof(MyEnumType));
            foreach (MyEnumType val in values)
                var enumName = Enum.GetName(typeof(MyEnumType), val);

Why should not use Session variable for better performence in ASP.NET?

However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information. The second request executes only after the first request is finished.

Re-Use MVC Views Across Projects With Razor Generat