(redirected from DotNet.CSharp)



pronounced “see (shärp)”


These notes were begun 4,5 years ago, and are slowly turning into something...OtherMichael October 22, 2010, at 03:26 PM


C# is intended to be a simple, modern, general-purpose, object-oriented programming language. It has roots in C++ and Java.


Dammit, I do like the semi-colons curly-braces.


Why? Because LexicalWhitespace drives me crazy. Code needs to be machine-readable and human readable.




The DotGNU project is characteristically far less charitable in their assessment of .NET:

Microsoft’s .NET strategy, [...] was born out of a vision for the future of information technology which we do not agree with, namely that “the era of ‘open computing,’ the free exchange of digital information that has defined the personal computer industry, is ending.” (source)


DotGNU looks interesting, but “As of December 2012, the DotGNU project has been decommissioned” (source). Bummer.



parsing a 6-digit year

DateTime.ParseExact("990601", "yyMMdd", System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yy")


Now, if the date is invalid, you’ve got another think coming....



WCF - Windows Communication Foundation

Windows Communication Foundation is... (.NET Framework Dev Center portal)
WCF RIA Services Part 1: Getting Started



WPF - Windows Presentation Foundation





Learn Visual C#
MS: Visual C# Developer Center


C# Yellow Book - free pdf


7 free .NET ebooks - okay, not exclusively C#




You probably want to use Visual Studio


If you or your employer can’t or won’t spring for the license, try one of the following:


VS Express

see Visual Studio Express



NOTE: I haven’t actually tried this


Sharp Develop

see Sharp Develop


Quick Sharp

Minimal IDE for C# - open source
NOTE: I haven’t actually tried this



Printing Multi-page TIF images in C#.Net

  • from Nick Gotch


Since it’s impacted a few of my applications already, I thought I’d mention this so other .Net developers could avoid the same peril.


There’s an easy mistake to fall into that could cause multipage tiffs to read only the first page.  I wrote Microsoft about it and was told that this is mentioned in their SDK, but I reviewed it and it’s extremely easy to miss (it’s like a one-line mention), and since it’s counter-intuitive and since we use multipage images quite a bit here I think it’s worth mentioning.


To get the page count for a multipage image in .Net you do something like


Let’s say at this point that it’s a five page TIFF image so the above statment returns 5.


Then let’s say to you do some processing on the image...


Now if you do the same call as above,
you’ll find that it now returns 1 not 5!


The reason for this is that whenever you perform image manipulations (that affect the image’s dimensions) on an active frame of a multipage TIFF, .Net looses track of the size of the individual frames and no longer can tell how many pages there are.


The solution to this problem (which works great as long as you know to do it) is simply to assign the value of the GetFrameCount() call to a variable (Integer) before you do any manipulations on the image.  Then, if you need to check how many pages are in the image, refer to your variable and not the GetFrameCount() method.


(As an added benefit, using a variable for the count is quicker than dereferencing the original method call as well!)




See Also

Sharp Develop
Visual Studio
F Sharp?


Category tags

Programming Languages  IDE Microsoft