CSharp

There are 10 entries for the tag CSharp

Releasing Email File Attachment Resources (System.Net.Mail)

Lesson learned about releasing attachment resources with System.Net.Mail.

GridView from LINQ to Objects

A technique for displaying results from LINQ to an ASP.NET GridView.

Ambiguous Symbol -- Compiler Error C2872

How I solved the Ambiguous Symbol -- Compiler Error C2872 problem in C++ (dot net).

ResponseStatusLine protocol violation

This is an example of how to get around the ResponseStatusLine protocol violation in multiple .NET languages and in the app.config file.

Playing with Enumerable.Range (System.Linq)

Here's an example of something fun and useful with Enumerable.Range in four different languages.

Ruby-Like "times" method #ruby #csharp #linq #vb #cpp

Here's the implementation of the Ruby-like "times" method that executes a block of code (n) times.

Linq Distinct and Custom Object Sort

I've seen a lot of posts of people having problems using Distinct() and/or Sort() with custom objects. Here is an example showing an implementation of both (in C++, C# and VB). This post includes custom Compare methods, the implementation of Distinct() and the use of List.ForEach in the 3 main dot net languages.

ILookup

There are many times where I need to convert an array of data into a Dictionary or Hash table. If the key to be used in the new Dictionary is not unique, it is necessary to manage duplicates. I previously went through a lot of gyrations, but eventually setteled on the ILookup. ILookup is not perfect, but it beats some alternatives.

GZipLib (playing with GZipStream)

A technique for using the GZipLib (.NET)

Whirlwind

Here are the Whirlwind videos on Channel 9.