I converted our project from .NET 2.0 to 3.5 and am looking for optimizations that can be done utilizing 3.5 framework. What are some of the things I can do with 3.5 as in Datastructures. Also any suggestions in using DataAccess apart from LINQ to SQL. Any suggestions/pointers would be great. I am not looking at any specific optimization, just a general . I am also using VB.NET :(
I'm not entirely sure what you mean by optimizations. Can you clarify a bit?
The 3.5 framework and the corresponding VB.Net compiler was not so much about optimization but much more about the concepts surrounding LINQ (language integrated query). It's a way of defining a generic query language, somewhat resembling SQL, that can be used on a variety of different sources.
For instance, lets say you had a list of Students and wanted to grab the ones which had a particular name. Prior to LINQ you'd write something like the following
Dim list As New List<Student>()
For Each cur in col
if cur.Name = SomeName Then
list.Add(cur)
End If
Next
LINQ greatly simplifies this by letting you write the following
Dim result = From cur in col Where cur.Name = SomeName
This link pretty much gives you all of the new VB 9.0 features at a glance:
http://msdn.microsoft.com/en-us/library/ms364068.aspx
- Implicitly Typed Local Variables
- Object and Array Initializers
- Anonymous Types
- Deep XML Support
- Query Comprehensions Extension
- Methods and Lambda Expressions
- Nullable Types
- Relaxed Delegates
VB 9 has a cool XML primitive type that lets you do:
Dim book As XElement = _
<book category="fiction" isbn=<%= isbnNumber %>>
<modifiedDate><%= modifiedDate %></modifiedDate>
</book>
Which is pretty cool! (code taken from msdn)