.Net Tips – Checking the current OS version
You can find out some useful information about the OS your application is running in by using the Environment.OSVersion property: You can also easily check for the minimum OS version:
You can find out some useful information about the OS your application is running in by using the Environment.OSVersion property: You can also easily check for the minimum OS version:
I stumbled across some interesting discussions on how they differ from non-static methods, here’s a summary of what I learnt. The Static Keyword In C# terms, “static” means “relating to the type itself, rather than an instance of the type”. You access a static member using the type name instead of a reference or a …
As you’re debugging and stepping through your code in Visual Studio, you will no doubt have come across the Call Stack window in Visual Studio: You can get access to the same stack trace information using the StackTrace and StackFrame class and this opens up some interesting possibilities. For instance, you can have a Log …
In C# there is no way to define a static method in an interface: This lack of static method can be painful at times, and on the surface one feels there is no reason why it can’t/shouldn’t be supported by the language. But after ploughing through forum discussions and numerous questions on StackOverflow I start …
Understanding the lack of static method in Interface in C# Read More »
JSON (JavaScript Object Notation) is a data transfer format widely adopted on the web because it’s lightweight compared to XML. I touched on the topic of JSON in an earlier post when I posted some extension methods for compressing/decompressing string. If you are unfamiliar with the JSON format or how it’s supported in .Net then …
In C#, there are two ways you can provide an alternative implementation of an inherited method: Override a virtual method Unlike Java where every method can be overridden by default unless marked with the final keyword, C# employs a safer, opt-in system where methods cannot be overridden unless marked with the virtual keyword. A virtual …
Hiding a base method vs Overriding a virtual method Read More »
Definition: CTP stands for Community Technology Preview, another fancy term for a ‘beta’ or ‘prototype’. RTM stands for Release To Manufacturing or Release To Market. References: Software release life cycle
I came across these two posts on Eric Lippert‘s blog yesterday which I found very interesting: Representation and Identity Cast operators do not obey the distributive law The blog posts go into a lot of details but long story short, if you box a value type you can’t unbox it to another type: It would …
If you try to serialize/deserialize a type which uses the generic Dictionary<TKey, TValue> type with the XmlSerializer then you’ll get an InvalidOperationException, for instance: Here’s my class: I’ll get an InvalidOperationException with an inner exception of type NotSupportedException when I do this: And the error message of the NotSupportedException is: “Cannot serialize member MyClass.MyDictionary of …
.Net Tips – Xml Serialize or Deserialize Dictionary in C# Read More »
As good and innovative as WCF is, it also introduced a lot of new complexities and whilst it is easy to get something up and running quickly it takes much more understanding to make your service perform as well as it could. There are many things you need to consider such as binding types, serialization …
WCF – Improve performance with greater concurrency Read More »
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.