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

What Is New in C# 3.0 - Part 8 (LINQ to SQL)

   This is the end, beautiful friend, the end. The end of (your) laughter and (my) soft lies. The end of nights we tried to code. The final part of the series. Because this is a series about the new things in the LANGUAGE C# 3.0 and not in Visual Studio 2008 or .NET Framework 3.5 it will end here. Actually this article is also out of scope but it is needed to better demonstrate how the features work in practice.

...
Posted by:   Stilgar
02:23 28.03.2008
First Previous ... 11 12 13 14 15 Next Last