I'm Going Functional

   You may have noticed that I did not post any programming related articles lately. The main reason for this is that after I played with C# 3.0 and LINQ I have not learned anything really interesting. That is why I am beginning to study F#. To quote the "Expert F#" book review:

   "Expert F# is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of .NET developers."

   Why learning F#?
   ...
Posted by:   Stilgar
16:54 29.07.2008

LINQ Adventures

   I know that every single person in my multi million user base is interested in LINQ. To your great satisfaction here are two pieces of somewhat strange LINQ behavior that you are (undoubtedly) going to enjoy.  The two pieces are completely unrelated. The first requires a little knowledge about LINQ to SQL and ADO.NET and the second requires good familiarity with the C# language (reading AND understanding the "What Is New in C# 3.0" series will do as well).
Last edited by:   Stilgar
on   23:04 13.12.2009
Posted by:   Stilgar
09:06 22.06.2008

Class Library project coming to Visual Web Developer Express

   Scott Gu just posted on his blog about the new features that Service Pack 1 for Visual Studio 2008 will bring to Visual Web Developer Express Edition. ASP.NET MVC will be supported on VWD Express but what I find more exciting is the ability to create class libraries(.dll) projects in VWD. I have always seen that as the biggest drawback of the Express Edition. I hope VWD will be able to open solutions that contain class library projects created in higher editions of Visual Studio. Right now it loads only the web projects. You can read the original post here.

   Update: Scott just confirmed in the comments on his blog that VWD Express will open solutions containing class libraries created in other editions of Visual Studio. I guess that makes VWD Express full featured IDE as long as you are a lone developer.
Last edited by:   Stilgar
on   13:13 03.06.2008
Posted by:   Stilgar
19:16 02.06.2008

Programming for Perverts

   Today I was looking at a Sun Certified Java Programmer example test (quite an old one - url no longer valid). There were some quite curious questions. I have taken out and modified questions that apply to C# (unless otherwise noted) and left out Java specific ones. Try to guess the compilation result/output! Here they are in C# version:

1.
     int i = 1;
     i <<= 31;
     i >>= 31;
     Console.WriteLine(i);
2.
     Console.WriteLine(Double.NaN == Double.NaN);

     double zero = 0;
     Console.WriteLine(Double.NaN == 3 / zero);
3.
     int i = 10;
     int j = 10;
     bool b = false;

     if (b = 10 == 10)
         Console.WriteLine("true");
     else
         Console.WriteLine("false");
4. This one behaves differently in Java and C#
Java:
     System.out.println(-0.0);
     System.out.println(-0.0 == +0.0);
     System.out.println(Math.min(-0.0,+0.0));
     System.out.println(Math.max(-0.0,+0.0));
     System.out.println(Math.min(-0.0,+0.0) == Math.max(0.0,+0.0));
C#:
     Console.WriteLine(-0.0);
     Console.WriteLine(-0.0 == +0.0);
     Console.WriteLine(Math.Min(-0.0, +0.0));
     Console.WriteLine(Math.Max(-0.0, +0.0));
     Console.WriteLine(Math.Min(-0.0, +0.0) == Math.Max(0.0, +0.0));
5.
     int i = 0;
     Console.WriteLine(i++ + ++i);
     Console.WriteLine(i++ + i++);
6.
     Console.WriteLine(Double.PositiveInfinity + Double.NegativeInfinity);
     Console.WriteLine(Double.PositiveInfinity == Double.PositiveInfinity);

Check the full article for the actual output!
Posted by:   Stilgar
03:28 16.05.2008

.NET and SQL Server Adventures

   While preparing the last set of upgrades for the no-blog I stumbled upon some strange issues with different technologies. I reasoned that I might help some of you or some poor googling soul by posting about them here...
Posted by:   Stilgar
03:20 07.05.2008
First Previous ... 11 12 13 14 15 Next Last