Free Online Courses for Software Developers - MrBool
× Please, log in to give us a feedback. Click here to login
×

You must be logged to download. Click here to login

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

VSLive 2007 - Part 2

Continuing our coverage on VSLive 2007 Austin, today was a Day with many sessions. I check the news about great and emerging technologies, including LINQ, DLINQ, XLINQ, Visual Studio 2008 and C# 3.0.

VSLive 2007

Report 2

 

Updated: November,13, 2007, 7 pm local time

 

Continuing our coverage on VSLive 2007 Austin, today was a Day with many sessions. I check the news about great and emerging technologies, including LINQ, DLINQ, XLINQ, Visual Studio 2008 and C# 3.0.

In the Ken Getz’s session, “LINQ, DLINQ e XLINQ – What’s it all about? ”, we had an overview of this great technology that promises to be one of major innovations of the decade. LINQ (Language INtegrated Query) unify in a single language queries to a database, XML documents and objects, available to C# and VB.NET. We can use LINQ with Objects, for example to extract data from a .NET collection that implements the IEnumerable interface. Objects can be use as data sources (imagine this like a ObjectDataSource of ASP.NET). LINQ works too ADO.NET, including relational databases and DataSets. With XML, LINQ its a better DOM. The LINQ syntax is very similar to SQL, but more powerful, including support from IntelliSense of Visual Studio. Below an example of  LINQ use. Note that we have a string collection and after we define a LINQ query to select the names where the length is equals to 5.

 

 

using System;

using System.Linq;

using System.Collections.Generic;

 

class app {

  static void Main() {

    string[] names = { "Burke", "Connor", "Frank",

                       "Everett", "Albert", "George",

                       "Harris", "David" };

 

    IEnumerable query = from s in names

                               where s.Length == 5

                               orderby s

                               select s.ToUpper();

 

    foreach (string item in query)

      Console.WriteLine(item);

  }

}

 

In the “VS2008 Deep Dive” session, by Jeffrey Palermo, we had an overview about the new features included in the next Visual Studio version.  Palermo shows that it’s possible to choice the framework  version when creating new projects (2.0, 3.0, 3.5). The templates available are filtered according the framework version. For example, WPF Applications is only available if you choice .NET 3.5. The Interesting is that the IDE enable/disable some options according your choice, as in the Add Reference dialog box. After you create a project, you can change the target platform going to project properties. We have now embedded support to AJAX , and support to debug JavaScript code inside the IDE! That’s it. With all debugger options available. We have JavaScript support  in the IntelliSense, other great new feature. Palermo creates too a WPF application and shows how to deploy it using the ClickOnce, with version control. Applications are automatically updated in the client when a new version (build) is available on the server.

In the “Introduction to C# 3.0” session, by Tim Rayburn, we had a clear explanation about the main language in the .NET Framework. To give you an idea about what is possible to do with C# 3.0, I put below some code snippets:

 

Automatically Properties

 

We can declare properties without to implement the get, set and the private field:

 

public string MyName { get; set; }

 

 

“var” Keyword

 

Allows omitting the object type in the declaration:

 

var i = 1;

 

Object Initializer

 

We can initialize objects properties in the constructor:

 

public class Numbers

{

   public int x ;

   public int y;

}

 

var myNumbers = new Numbers { x = 0, y= 0}

 

Collection Initializer

 

We can initialize collections in its creation:

 

List Animals = new List {

   "horse", "dog", "cat" } ;

 

Anonymous Types

 

We can create objects without to define a type! The compiler will create the type “on-the-fly”:

 

var Guinther = new {hair="black", skin="white", age=29}

 

Extension Methods

 

Allows to extend types adding methods, without the necessity of the source code, for example, int32, string. In C# the this keyword must be placed as the first parameter of the method:

 

public static int ToInt(this string s)

{

   return Convert.ToInt32(s) ;

}

 

string s = "1";

int i    = s.ToInt();

 

That’s it, don’t miss the next report tomorrow! Below some conference pictures:

 

 

Ken Getz: LINQ

 

C# 3.0: Tim Rayburn



Guinther Pauli is author of 100 articles more than published and the book ''''Delphi - Programming for Bank of Dados and Web''''. He is Bachelor in Systems of Information for the University Center Franciscano (Unifra, Saint Maria ...

What did you think of this post?
Services
[Close]
To have full access to this post (or download the associated files) you must have MrBool Credits.

  See the prices for this post in Mr.Bool Credits System below:

Individually – in this case the price for this post is US$ 0,00 (Buy it now)
in this case you will buy only this video by paying the full price with no discount.

Package of 10 credits - in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download few videos. In this plan you will receive a discount of 50% in each video. Subscribe for this package!

Package of 50 credits – in this case the price for this post is US$ 0,00
This subscription is ideal if you want to download several videos. In this plan you will receive a discount of 83% in each video. Subscribe for this package!


> More info about MrBool Credits
[Close]
You must be logged to download.

Click here to login