Wimdows.NET

Wim's .NET blog

Browse by Tags

All Tags » C# (RSS)
Unexpected behaviour: Defining values in enums
I don't normally regurgitate other blogger's posts like a headless chicken, but in this case it's worth mentioning. Stephen , a colleague of mine, and a picky sod (who puts their enums in alphabetical order? - no serious comments on that remark...
Posted: Feb 23 2007, 03:35 PM by Wim | with 28 comment(s)
Filed under: , ,
Dump the Module keyword in VB.NET!
Though I'm mainly a C# developer, I now and then get exposed to some VB.NET stuff. No, this is not going to be a C# vs. VB.NET debate. We've seen enough heated arguments and flame wars on that topic over the years. Something about VB.NET Console...
Posted: Sep 03 2006, 12:53 PM by Wim | with 120 comment(s)
Filed under: , ,
Generic Parse method on Enum - a solution
David Findley writes about how he wishes we had a generic Parse method on the Enum class in .NET 2.0. Though I agree in principle, it's actually quite trivial to create a generic static class with a Parse method, which alleviates some of the pain. Here...
Posted: Jul 06 2006, 09:59 AM by Wim | with 14 comment(s)
Filed under: ,
ArraySegment Structure - what were they thinking?
From the MSDN docs : ArraySegment is a wrapper around an array that delimits a range of elements in that array. Multiple ArraySegment instances can refer to the same original array and can overlap. Turns out this structure doesn't even deserve the...
Posted: Jun 14 2006, 03:24 PM by Wim | with 19 comment(s)
Filed under: , , ,
ASP.NET 1.1 server control for <link> - enabling relative URL paths using tilde "~"
Here's a simple - but useful Link webcontrol class that supports the "~" tilde syntax for relative paths for the href attribute of the <link> element. [DefaultProperty("Text"),ToolboxData("<{0}:Link runat=server Href=\"\" Rel=\"Stylesheet\" Type...
Posted: Apr 27 2006, 11:56 AM by Wim | with 9 comment(s)
Filed under: , ,
Public available data - FREE screenscraping or pay for API
Been working on a semi-commercial pet project of mine, for which I need a data feed. A decent enough subset of this data feed is publicly available from this content provider's main website. However, the full dataset (though I won't need all that) is...
Posted: Jan 23 2006, 08:42 PM by Wim | with 2 comment(s)
Filed under: ,
Why don't we see any patches for Visual Studio .NET? (2002, 2003, 2005...)
Frans has mentioned this on numerous occasions I believe, and this topic has reared its ugly head once again . Dan Fernandez' post back in March 2004, doesn't really address the reasoning behind it. Personally, I really don't see the difficulty for Microsoft...
Posted: Nov 04 2005, 02:36 PM by Wim | with 11 comment(s)
Filed under: ,
Possible Bug : HttpPost and class name conflicts
A colleague and friend of mine run into some very odd web service behaviour on ASP.NET 1.1. Anyone who can shed some light on this, please leave a comment. I have pasted his exact text describing the problem below. -- Included below is a minimal web-service...
Posted: Oct 02 2005, 11:33 PM by Wim | with 26 comment(s)
Filed under: ,
MD5 or SHA1 hashing - the easy way
This is a typical example of a static method which IMHO is in the wrong namespace. If you're looking to use an MD5 or SHA1 hashing algorithm to hash passwords, a lot of people would start looking in the System.Security.Cryptography namespace. But the...
Posted: Jul 05 2005, 10:26 AM by Wim | with 15 comment(s)
Filed under: ,
CharSet enumeration for P/Invoke and StructLayout
Hongmeig blogs about the difference between Marshal.SizeOf(typeof(char)) and sizeof(char) . The reason for this is that a char in unmanaged code (P/Invoke, marshalling) is 1 byte and like Hongmeig says in the .NET framework a char is Unicode, so 2 bytes...
Posted: Aug 19 2004, 11:43 AM by Wim | with 7 comment(s)
Filed under:
More Posts Next page »