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. 

http://msdn.microsoft.com/en-au/library/ms178581(v=vs.100).aspx

Re-Use MVC Views Across Projects With Razor Generat

http://blog.mirajavora.com/re-use-mvc-views-across-projects-with-razor-generator
Razor-Generator-Extension