Category Archives: C#

Create an instance with an internal constructor without using ‘new’

It was a surprise for me that Activator.CreateInstance does not create an instance using an internal constructor when its class is declared in another assembly and marked with InternalsVisibleToAttribute pointed to a calling assembly. I’m not sure does it work … Continue reading

Posted in .NET, C# | Leave a comment

Exceptions that could not be caught

A curious question was raised during one of a conducted interview. Could the StackOverflowException be caught? I thought it could. And it was but only until framework v2. Since the second framework it is impossible to catch such an exception, … Continue reading

Posted in .NET, C# | Leave a comment

MVC View Compilation

To generate views’ code during compilation of ASP .NET MVC 2 application, its project file (*.csproj) should contain next (the rest has been omitted):

Posted in .NET, ASP .NET MVC, C# | Leave a comment

Lukianol.Arguments. Dynamic Support

I continue to work with the Lukianol.Arguments API. If you might notice it is very ugly when you want to get typed arguments from a result: result.GetValue<bool>(“UseProxy”) result.GetValue<TimeSpan>(“timeout”) A lot of letters as for me. What could we do here?

Posted in .NET, C#, Codeplex | Leave a comment

Application Arguments. Fluent. CodePlex

I have decided to get a deal with annoying application arguments. Those arguments you work with when creating various console applications. For your utilities, or for long-term tests and attempts.

Posted in .NET, C#, Codeplex | Leave a comment