I just discovered yield. Wow. After using some of the new tools languages like Ruby provided (blocks, process control), it’s been hard to go back to Java. Nice to C# is up to more than just adding syntactic sugar (cough, Java5, cough).
C# and Yield
July 31, 2007Diving Into .NET
July 10, 2007I’ve been coding Java for a good seven years now, ever since I walked away frustrated from writing business applications in lower level COM+, ATL, and C++. Tonight I dug into a .NET training book for the first time, as I plan on getting certified mainly as a goal for learning. It’s really hard to look at C# as a Java programmer and not see the overwhelming similarities. System.Console.Writeln isn’t fooling anyone. That said, I’m already seeing some niceties. Tonight’s example:
bool? flag = null;
The ‘?’ allows you to indicate the variable is nullable. Java is going to make you think about ints and Integers, even in the Java 5+ world.
Posted by Rich
Posted by Rich