tclogo



HotelsCombined.com

Pages

Archives

Categories


Recent Postings

Recent Comments

Feeds

RSS2 feed

Links

Most Popular Posts

Archive for November 2009

Google releases Go language

Wednesday, 11th November 2009 10:27pm
Google has released a new open source programming language called Go which attempts to combine the development speed of a dynamic language like Python with the performance and safety of a compiled language like C or C++.

According to the Go language website Google says this is an experimental language which it developed but developers can have a go and see how it works.

I don't think I will have the time to play with this new language at this time but it would be interesting to see how many would try it out and learn the new language.

I have had past experiences with C and C++ but not Python and that could be the attraction for me where I to attempt to have a look at it.


delicious delicious | digg digg

Category: Open Source | Comments : 1

Sorting with a second sort parameter

Wednesday, 11th November 2009 2:25pm
Its fairly common that I need to sort a list in C# with a second sort parameter when the first sort parameter is equal.

Its easier maybe to explain this with an example. Say I have list of Member objects with first name, last name and postcode and I am sorting on last name but would like to sort on first name if there two people with the same last name.

So assuming class Member, I would go like this:


List member = new List();

member.Sort(
delegate(Member member1, Member member2)
{
if (member1.LastName == member2.LastName)
return member1.FirstName.CompareTo(member2.FirstName);
else
return member1.LastName.CompareTo(member2.LastName);
});


delicious delicious | digg digg

Category: C# | Comments : 0