January 30, 2008

What’s New in C# 3.0? Part 2

ith the release of Visual Studio 2008, Microsoft has updated the C# language to its latest version, 3.0. C# 3.0, contains several key language enhancements that support the recently-announced Language Integrated Query (LINQ) feature. Part 2 of this series picks up where Part 1 left off, walking you through C#’s

Determine Whether a C or C++ Compiler Was Used to Compile Code

The code below contains standard, pre-defined macros used at runtime to determine whether a C or C++ compiler was used to compile the code. For C compilers, it also determines the version of the C language standard that the compiler implements). NOTE: Some people prefer to use STDC_HEADERS rather than

Get the Current Date Using GregorianCalendar

To get the current date, your first instinct is probably to use the java.util.Date class. However, this class has so many deprecated methods that it’s probably best to ignore it. A more powerful and flexible alternative is java.util.GregorianCalendar. Here’s a simple example of how to use this class for obtain

Changing the Title in a Web Form

In ASP.NET, a web form’s title is determined by the HTML View’s Title attribute. However, there is no property in the default (or any other namespace) that helps you to change the title programmatically. Here’s a simple workaround to accomplish this: Modify the current tag so that it’s accessible in