Erwin's Blog

Developing with .NET

Browse by Tags

All Tags » C# (RSS)
Creating a delimiter separated list from list of strings
When you have a list of strings like IList<string> of IEnumerable<string> and you want to convert it to for example a comma separated list you can easily do that with the String.Join method. List< string > list = new List< string...
Posted: Jun 24 2009, 10:15 AM by erwin21 | with 3 comment(s)
Filed under: , ,
DevDays ‘09 The Netherlands day #2
The second day of DevDays and 5 more interesting sessions to follow. At 9:15 the first session of this day started it called “Functional Programming in C#” from Oliver Sturm . In this session we dived deep in to C# with a lot of C# 3.5 LINQ and lambda...
Convert string to byte array and byte array to string
How do we convert a string to a byte array (byte[]) and the other way around. The most simple way to do this is with the Encoding class: String to bytes: byte [] bytes = Encoding.UTF8.GetBytes( "foo" ); Bytes to string: string foo = Encoding.ASCII.GetString...
Posted: May 01 2009, 12:19 PM by erwin21 | with 2 comment(s)
Filed under: , ,
Add Web Reference with certificates on https
Today I was adding a webservice via "Add Web Reference" to my project. The webservice was only accessible on https with a client certificate. When I did "Add Web Reference" I got a "The underlying connection was closed: Could...
Edit existing assemblies when you have no source code
Every now and then there are situations when you have no source code available, because you lost it or you don't get it. There are some solutions to see or get the source code, with Reflector you can see the source code but you can't edit it, but with...
Posted: Dec 15 2008, 11:33 PM by erwin21 | with no comments
Filed under: , ,
From C++ to C#
In a new article on CIO.com Anders Hejlsberg tells next to a lot of other things how C# get's his name. Below a quote of the article: [CIO] Why was the language originally named Cool, and what promoted the change to C#? [AH] The code name was Cool, which...
Posted: Oct 28 2008, 12:50 PM by erwin21 | with no comments
Filed under: ,
C# vs Ruby vs PHP vs Perl vs Java
A few days ago I posted a comparison of C# vs Ruby. So I thought what about adding some more populair programming languages to the graph. And what to we see below: c# 2.05 ruby 1.00 php 3.65 perl 0.75 java 7.65 The other languages (php, perl, java) has...
Posted: Sep 20 2008, 12:16 AM by erwin21 | with 1 comment(s)
Filed under: , , , ,
C# vs Ruby
A product of Google labs called " trends " is usefull to investigate search trends. What happes if we compare the search terms "C#" and "Ruby"? c# 2.02 ruby 1.00 What do we see in the graph, the Ruby line (red) stays pretty constant during the whole week...
Posted: Sep 17 2008, 11:35 PM by erwin21 | with no comments
Filed under: ,
More Posts