|
|
-
SLaks Posted 12 Months ago through Syndicated Blogs
If you open an older ASP.Net MVC3 project in Visual Studio 2012, you may see lots of errors in the Razor views, along the lines of “The name 'model' does not exist in the current context”, and similar errors whenever you try to use MVC features like HTM...
|
-
SLaks Liked 1 Years ago through Pages
We wish to use these pages for publishing various documents, announcements, FAQ etc related to beyondrelational.com...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
Last year, Microsoft announced a simple new feature in C# 5: Caller Info Attributes. These attributes let you to create methods with optional parameters and tell the compiler to pass the caller’s filepath, line number, or member name instead of th...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
If you use the ASP.Net MVC 3 [Compare] validation attribute on a model property, then include that model as a property in a parent model (so that the field name becomes Parent.ChildProperty), the built-in unobtrusive client validation will choke, and wi...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
One of the most useful additions to the .Net 4.0 base class library is the System.Collections.Concurrent namespace, which contains an all-new set of lock-free thread. However, these collections are noticeably different from their classical counterparts...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
Most languages – with the unfortunate exception of Java – allow functions to be passed around as variables. C has function pointers, .Net has delegates, and Javascript and most functional programming languages treat functions as first class objec...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
This is part 2 in a series about state and function pointers; part 1 is here. Unlike most other languages, it is not possible to include any form of state in a function pointer in C. Therefore, it is impossible to fully implement closures in C w...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
This is part 3 in a series about state and function pointers; part 1 is here. Last time, we saw that it is impossible to bundle context along with a function pointer in C. In C#, it is possible to fully achieve my standard example. In order to...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
This is part 4 in a series about state and function pointers; part 1 is here. Last time, we saw that it is possible to pass local state with a delegate in C#. However, it involves lots of repetitive single-use classes, leading to ugly code. To...
|
-
SLaks Posted 1 Years ago through Syndicated Blogs
This is part 5 in a series about state and function pointers; part 1 is here. Last time, we saw how C# 2 supports closures by compiling anonymous functions into member functions of a special class that holds local state from the outer function. ...
|