This was just posted on IE blog. The developers that work on the new release of Internet Explorer just completed successfully the famous Acid2 test.
While web developers will immediately recognize what Acid2 means, I want to step back and offer some context for other readers of this blog who may not be familiar with web standards. Briefly: Acid2 is one test of how modern browsers work with some specific features across several different web standards.
here is their blog entry
Monthly Archives: December 2007
Internet Explorer 8 completes Acid2 test
Converting SQL to LINQ, Part 4: Functions
Part 4 from Bill Horst’s series, now its functions turn.
Functions
SQL SELECT clauses often involve functions, which can be scalar or aggregate. An aggregate function is applied to a field over all the selected records, while a scalar function is called with individual values, one record at a time. It is possible to re-create both kinds of functions with VB LINQ expressions, but in very different ways.
Scalar Functions
Scalar functions are called on each record with whatever parameters are specified. They can appear various places in a SQL query, such as in the SELECT clause. The Scalar Functions available differ from system to system, but usually, there will be an analogous VB method that can be used. If using a Scalar Function in a LINQ Select clause, you will probably need to specify an alias as well (FirstThreeLetters, CurrentTime).
SQL
SELECT LEFT(ItemName, 3) FirstThreeLetters, NOW() CurrentTime FROM OrderTable
VB
From Shipment In OrderTable _ Select FirstThreeLetters = Left(Shipment.ItemName, 3), CurrentTime = Now
In the above case, Left and Now are methods already built into VB, defined in Microsoft.VisualBasic.dll. This will likely be the case for most common scalar functions you will find in SQL statements. Even if the function you wish to call does not exist in VB already, you can define your own methods, too. However, user-defined methods cannot be used in a Database query, as they will throw an exception at runtime. In the below example, MyFunction is a user-defined function called from the Select clause.
VB
From Shipment In OrderTable _ Select MyFunction(Shipment.Cost, Shipment.ShippingZip)
Aggregate Functions
Aggregate functions are called on certain fields over an entire set of records, and return one value. In a SQL statement, they can appear in the SELECT clause. With VB LINQ, this concept appears a bit differently.
A VB LINQ expression usually begins with a From clause. However, they can also begin with an Aggregate clause. The Aggregate clause has the same syntax as a From clause, except that it starts with a different keyword. If a query starts with an Aggregate clause, it must end with an Into clause. An Into clause is a comma-delimited list of Aggregate function calls, with aliases that can accompany them. The below example shows a SQL SELECT statement that uses Aggregate functions, and an equivalent VB LINQ expression.
SQL
SELECT SUM(Cost) TotalCost, COUNT(*) FROM OrderTable WHERE OrderDate > “Sept-29-2007”
VB
Aggregate Shipment In OrderTable _ Where Shipment.OrderDate > #9/29/2007# _ Into TotalCost = Sum(Shipment.Cost), Count()
Mono 1.2.6 Released
Thats the latest release! It includes some nice features. Check them out here:
* Native Windows.Forms driver for MacOS X allows Winforms-based applications to run without an X server.
* Support for the ASP.NET AJAX APIs and controls.
* Support for FastCGI deployments: ASP.NET can now be deployed on a multitude of servers that implement the FastCGI protocol (lighttpd for example) in addition to Apache.
* Windows.Forms now supports the WebControl on Windows and Linux using Mozilla.
* Runtime will now consume much less memory for 2.0-based applications due to various optimizations in generics support as well as including many new performance improvements and an updated verifier and an implementation of CoreCLR security.
* C# compiler is quickly approaching full 3.0 support, most of the basics work right now (except support for System.Query.Expression AST generation).
* Mono 1.2.6 can now be used as an SDK for creating Silverlight 1.1 applications on all platforms. This allows developers to create applications that target Silverlight without requiring a Windows installation.
Full details are available on the release notes. To get a copy, visit the downloads section on the web site.
Hidden Gems in Visual Basic 2008 by Amanda Silver
I found that one at the Visual Basic Team Blog. Over here she puts together a list of some of the new features in Visual Basic 2008:
I like these ![]()
2) If Operator
Ever notice that the IIF function returns something of type Object? This means that you don’t get Intellisense or type-checking by default on that result. For those of you that insist on type-safe, early-bound code, you have to cast the result. The code then looks something like this:
Dim intC As Integer = CInt(IIf(intA = intB, intA, intB - 1))
With the If operator, you can now write that line as:
Dim intD As Integer = If(intA = intB, intA, intB)
And with type inference it gets even easier on the eyes:
![]()
4) Nullable
Nullable is the feature you’ll notice but rarely have to think about. It’s basically the .NET representation for a Nullable value type (Integer, Date, etc.) Using the designer for LINQ to SQL, the Object-Relational Mapping layer introduced in Visual Studio 2008, nullable columns in your database are mapped to this type. The result is that you can write the following expression in VB and the right thing happens – null valued rows propagate null. In the example below, the Independence property on the Country type is a nullable date, denoted as Date?
Dim virginIslands As New Country With {.Independence = Nothing} Dim palau As New Country With {.Independence = #10/1/1994#} Dim vILength = #8/24/2005# - virginIslands.Independence ' Nothing Dim pLength = #8/24/2005# - palau.Independence ' 3980.00:00:00
9) Type inference for loop variables
Check out the following code:
![]()
And this code:
![]()
Without having to specify the type of the control variable, it’s inferred from right-hand-side expression or the collection we’re iterating over.
Extending Base Type Functionality with Extension Methods
This article comes from Scott Mitchell at 4guysfromrolla.com. Its good post which I liked and wanna share with you:
Extension methods allow a developer to tack on her own methods to an existing class in the .NET Framework. For example, imagine that our developer created a method named StripHtml, that strips HTML elements from a string using a regular expression. By associating this method with the System.String class, it could be called as if it was one of the System.String class’s built-in methods:
Dim str As String = "<b>Hello, world!</b>" Dim strippedString = str.StripHtml()
Creating the Extension Methods with Visual Basic
In order to create the extension methods in Visual Basic we need to first create a Module. For each extension method you want to create, add a method whose first input parameter is of the type that you want to add the extension method to. Moreover, prefix the method with the Extension() attribute.
The following Module named DateTimeHelpers contains two methods: ToRelativeToCurrentTimeString(DateTime) and ToRelativeToCurrentUtcTimeString(DateTime), both of which accept a DateTime instance as their first input parameter. The methods are also marked with the Extension() attribute (which is found in the System.Runtime.CompilerServices namespace). The two methods call the private ToRelativeString method, which returns the appropriate string message based on the difference in time between the two passed-in DateTime values.
Imports System.Runtime.CompilerServices Imports Microsoft.VisualBasic Namespace Helpers Public Module DateTimeHelpers <Extension()> _ Public Function ToRelativeToCurrentTimeString(ByVal dt As DateTime) As String Return ToRelativeString(dt, DateTime.Now) End Function <Extension()> _ Public Function ToRelativeToCurrentUtcTimeString(ByVal dt As DateTime) As String Return ToRelativeString(dt, DateTime.UtcNow) End Function Private Function ToRelativeString(ByVal timeInPast As DateTime, ByVal currentTime As DateTime) As String If timeInPast.Date <> currentTime.Date Then ' timeInPast happend more than a day ago... show the date & time Return timeInPast.ToString() Else ' timeInPast and currentTime happened on the same day... Dim secondsApart As Integer = Convert.ToInt32(currentTime.Subtract(timeInPast).TotalSeconds) ' See if the date dt is within the last hour... If secondsApart < 10 Then Return "Seconds ago..." ElseIf secondsApart < 60 Then Return "Less than a minute ago..." ElseIf secondsApart < 3600 Then Return String.Format("{0:N0} minutes ago...", secondsApart / 60 + 1) End If ' Ok, the date is more than an hour old... show the time Return timeInPast.ToShortTimeString() End If End Function End Module End Namespace
We can now call these extension methods from a DateTime instance. In order to use an extension method, we first need to add an Imports directive to the code file, importing the namespace where the extension methods reside (Helpers). Upon doing that, the extension method is visible in the IntelliSense drop-down list, as the following screen shot illustrates.

read source
ASP.NET 3.5 Extensions CTP Preview Released
Few days ago from Microsoft released ASP.NET 3.5 Extensions CTP Preview. This release brings additional runtime functionality to ASP.NET and .NET 3.5. You can download it here.
Here is what this release includes:
* ASP.NET AJAX Improvements: New ASP.NET AJAX features in the ASP.NET 3.5 Extensions release include better browser history support (back/forward button integration, and server-side history management support), improved AJAX content linking support with permalinks, and additional JavaScript library improvements.
* ASP.NET MVC: This model view controller (MVC) framework for ASP.NET provides a structured model that enables a clear separation of concerns within web applications, and makes it easier to unit test your code and support a TDD workflow. It also helps provide more control over the URLs you publish in your applications, and more control over the HTML that is emitted from them.
* ASP.NET Dynamic Data Support: The ASP.NET 3.5 Extensions release delivers new features that enable faster creation of data driven web sites. It provides a rich scaffolding framework, and will enable rapid data driven site development using both ASP.NET WebForms and ASP.NET MVC.
* ASP.NET Silverlight Support: With the ASP.NET 3.5 Extensions release we’ll deliver support for easily integrating Silverlight within your ASP.NET applications. Included will be new controls that make it easy to integrate Silverlight video/media and interactive content within your sites.
* ADO.NET Data Services: In parallel with the ASP.NET Extensions release we will also be releasing the ADO.NET Entity Framework. This provides a modeling framework that enables developers to define a conceptual model of a database schema that closely aligns to a real world view of the information. We will also be shipping a new set of data services (codename “Astoria”) that make it easy to expose REST based API endpoints from within your ASP.NET applications.
Microsoft Live Labs Volta

The Volta technology preview is a developer toolset that enables you to build multi-tier web applications by applying familiar techniques and patterns. First, design and build your application as a .NET client application, then assign the portions of the application to run on the server and the client tiers late in the development process. The compiler creates cross-browser JavaScript for the client tier, web services for the server tier, and communication, serialization, synchronization, security, and other boilerplate code to tie the tiers together.
Developers can target either web browsers or the CLR as clients and Volta handles the complexities of tier-splitting for you. Volta comprises tools such as end-to-end profiling to make architectural refactoring and optimization simple and quick. In effect, Volta offers a best-effort experience in multiple environments without any changes to the application.
Converting SQL to LINQ – DISTINCT, WHERE, ORDER BY and Operators
Bill Horst continues with those simple examples. After this one here comes the other set. They are perfect to show basic syntax. Here are few more:
DISTINCT
SQL SELECT statements can include the DISTINCT specifier, which causes all duplicate records in the query result to be removed. In a LINQ expression, Distinct is its own individual clause, rather than a specifier on the Select clause. This means that Distinct can appear between any two other clauses. The Distinct clause takes whatever result is returned by the preceding clause (Select, in the case below) and returns a filtered result with duplicates removed. To two code examples below accomplish the same results:
SQL
SELECT DISTINCT Name, Address FROM CustomerTable
VB
From Contact In CustomerTable _ Select Contact.Name, Contact.Address _ Distinct
ORDER BY
The SQL ORDER BY clause can also be represented in a LINQ expression. A LINQ Order By clause allows for a comma-delimited list of expressions to specify how results should be sorted. Any valid VB expression can be used, so these expressions don’t necessarily have to be the names of field that were selected.
SQL
SELECT * FROM CustomerTable ORDER BY Phone
VB
From Contact In CustomerTable _
Order By Contact.PhoneASC/DESC
A SQL ORDER BY clause can also include ASC and DESC keywords, to specify that the sort should be in ascending or descending order, respectively. VB uses Ascending and Descending keywords for the same purpose, with the same syntax. If neither specifier is present, ascending order is the default.
SQL
SELECT * FROM CustomerTable ORDER BY Phone ASC, Name DESC
VB
From Contact In CustomerTable _ Order By Contact.Phone Ascending, Contact.Name Descending
Here is the original post by Bill Horst