Browse by Tags
All Tags »
.NET FAQ (
RSS)
Sorry, but there are no more tags available to filter with.
Problem You want to serialize a type; however it: implements IDictionary , or derives from DictionaryBase , contains a member which implements IDictionary or derives from DictionaryBase , which causes XmlSerializer to throw an exception: "System.NotSupportedException...
This is something that comes up frequently. Check out the below link I wrote a long long time ago. Hope it has some helpful information. Please drop me a mail if you have questions. http://t-mug.org/certification.aspx
Just published this here: http://support.microsoft.com/kb/555436
Just published this here: http://support.microsoft.com/kb/555396 Interestingly, I had stumbled upon this while answering this post: http://www.msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.general&mid=ff9719e6-3829-4122-8b23...
Just came across this blog entry on why Multiple Inheritance was not implemented in .NET. http://blogs.msdn.com/csharpfaq/archive/2004/03/07/85562.aspx
Use the StackFrame and StackTrace classes. For example: public static void SourceMethod() { TargetMethod(); } public static void TargetMethod() { StackTrace st = new StackTrace(); // This will output 'SourceMethod' Console.WriteLine(st.GetFrame(1).GetMethod...
Though both would appear similar – they are both read only and generate almost similar IL code – they have a number of differences. Here they are: Constants are evaluated at compile time, whereas static (or static readonly ) variables at runtime. So,...
Background This is a topic repeatedly asked about both online and offline. This entry explains the following OOPs concepts to help clear them: Method overriding and method hiding (implemented using the override and new keywords in C# and Overrides and...
Problem You want to create a unique number for: using an a primary key in a table for security purposes like creating a salt to attach to a hash value Possible solutions Create a new GUID (Globally Unique Identifier) by using the GUID.NewGuid method Use...
Problem You want to find out the number of times a specific character is repeated in a string, but you don't want to use iterative blocks like while, for etc.. Solution Use the Split method, and subtract 1 from the length of the string returned. Example...
Problem You want to create an application which could dynamically load ‘plug-ins’ at runtime. You want to do this because: you want other people to create plug-ins for your application without exposing your source code you have a module which keeps changing...
MSDN has a paper which lays down guidelines on naming conventions, class member usages, exposing functionality etc. This is a must-see resource for all who want to use a standard convention while coding, to create class libraries and whoever else who...