Title: Whats new in Visual Studio'NET 2005
1Whats new in Visual Studio.NET 2005
Michael V. Ekedahl University of Nevada, Reno
2Session Overview
- Changes to the Integrated Development Environment
- Improvements to Windows Forms
- Changes to the .NET Framework
- Visual Basic language enhancements
- Enhancements and changes to controls
- An improved Help system
- Changes to Data Management
3Whats new with the IDE (1)
- Edit and Continue support has been added
- A return from VB 6
- Exception assistant
- Gives help to solve exceptions when they are
thrown - A better Immediate window
- Design-time expression evaluation
- Task list and Error list are factored into two
windows - IDE is more configurable
- Project organization has changed
4Whats new with the IDE (2)
In-place property editing
5Whats new with the IDE (3)
Code snippets create templates for common tasks
6Whats new with the IDE (4)
Autocorrect typographical errors
7Whats new with the IDE (5)
Docking tips
8Whats new With Forms (1)
- Property selection
- The Visual Basic 6.0 Forms collection is back (in
a way) - My.Forms supplies a reference to each declared
form - A default form instance is also created
- A bit of history from VB 6
- A few new events
9Whats new With Forms (2)
Snap lines make control alignment a snap
10Whats new with the .NET Framework (General)
- 64-bit platform support
- IO has been enhanced to read and write data using
GZIP compression - The new GZipStream class
- The SerialPort class allows us to access serial
ports and communicate with serial devices
11Whats new with the .NET Framework (Networking 1)
- There is SMTP support to send and receive e-mail
messages - Attachments and carbon copies are supported
- SmtpClient class has methods to send messages
(Send, SendAsync) - Messages themselves are managed as MailAddress,
Message, MailAttachment
12Whats new with the .NET Framework (Networking 2)
- FTP support has been added through
- Methods of System.Net.FtpMethods
- And My.Computer.Network
- Ping is supported through System.Net.NetworkInform
ation.Ping and My.Computer.Net.Ping
13Whats new with Visual Basic (1)
- Unsigned whole number types are supported as in
- lblSByte.Text System.SByte.MaxValue
- lblUShort.Text System.UInt16.MaxValue
- lblUInteger.Text _
- System.UInt32.MaxValue
- lblULong.Text System.UInt64.MaxValue
- Partial classes allow a class to be split between
multiple physical files - Designer generated code and developer created
appears in separate files
14Whats new with Visual Basic (2)
Several new templates have been added
15Whats new with Visual Basic (3)
- Generics provide the means to create strongly
typed lists such as an ArrayList - Generics for List, Dictionary, SortedDictionary,
Queue and Stack are supported - Performance of generics is better because objects
are strongly typed - Dim PersonList As New List(Of Person)
- PersonList.Add(New Person("Joe", 23))
16Whats new with Visual Basic (4)
- Visual Basic now supports operator overloading
- Existing operators are overloaded as in
- Dim p1 As New Point(10, 10)
- Dim s1 As New Size(20, 20)
- Dim pResult As Point p1 s1
- Its also possible to create overloaded operators
for custom classes
17Whats new with Visual Basic (5)
- The Using statement eliminates the need to
finalize objects - Create a class instance in the Using statement
- Scope of class instance is the Using block
- Using f As New Font("Arial", 12)
- ' Statements that use f
- End Using
18Whats new with Visual Basic (6)
- The Continue statement skips to the next
iteration of a loop - The IsNot operator is simplifies syntax Thus,
- Dim t As TextBox Nothing
- If Not (t Is Nothing) Then
- becomes
- If t IsNot Nothing Then
19Whats new with Visual Basic (7)
- In Visual Studio 2003, CType and DirectCast were
used to convert types - Exceptions would be thrown if the type could not
be converted - TryCast attempts a cast and returns Nothing if
the type cannot be converted - Dim p As Person
- p TryCast(SomeObject, Person)
- If p IsNot Nothing Then
- ' Statements
- End If
20Whats new with Visual Basic (8)
- The following application-level events are
supported in the partial class named
MyApplication - Shutdown fires after all forms are closed
- Startup fires just before the startup form is
created - StartupNextInstance fires when a single instance
application is started that is already running - NetworkAvailabilityChanged fires when the network
becomes available or unavailable - UnhandledException fires in case of any exception
that has not active handler
21Whats new with the .NET Framework (My)
- The My keyword references objects to
- Get to resource files with My.Resources
- Get information about the local computer with
My.Computer - My.Computer.Info gets configuration information
- My.Computer.Registry gets to the registry
- Communicate with the network using
My.Computer.Network - Interact with the current application using
My.Application - Print easily with My.Computer.DefaultPrinter
22Whats New with the .NET Framework (My)
- Factory methods get a reference to a form as in
My.Forms.Form1 - A reference to the WebService proxy can be
obtained through My.WebServices making it easy to
find the supported members - Multimonitor support is included as in
-
- Dim s As Screen()
- Dim r As Rectangle
- s System.Windows.Forms.Screen.AllScreens
- r s(0).WorkingArea
23Whats new in Controls (1)
- MenuStrip control replaces the MainMenu control
- The functionality is similar
- The implementation differs significantly
- Images are now supported on menu items
- Images are stored in resource files
- Pascal case menu naming is automatic
- DataGridView control displays data in a tabular
format - The control works in a bound or unbound mode
- Custom cell and column types are supported
24Whats new in Controls (2)
- SplitContainer control is made up of two panels
separated by a movable bar - SplitContainers can be nested
- Great for drill-down interfaces
- Replaces the Splitter control
- MaskedTextBox provides simple to use input
validation
25Whats new in Controls (3)
- FlowLayoutPanel and TableLayoutPanel give us Java
layout capabilities - FlowLayoutPanel contents can be adjusted
horizontally or vertically - Contents may be clipped
- TableLayoutPanel
- A grid composed of rows and columns
- Controls can be nested
- The grid is dynamic
26Whats new in Controls (4)
- FolderBrowserDialog allows simple folder
selection - SelectedPath property contains the folder
selected by the user
27Whats new in Controls (5)
- WebBrowser control provides simple browser
capabilities - WebBrowser1.Navigate("file//c/foo.htm")
28Whats new in Help (1)
- The Help system has been overhauled
- Topic pages can be expanded or collapsed
- How to help is task based instead of feature
based - More code examples are included
- Its easy to copy sample code
29Whats new in Help (2)
- JavaDoc like documentation is supported
- We refer to them as XML comments
- XML comments appear in tooltips
30Whats new with Data Management (Introduction)
- ADO.NET 2.0 supersedes ADO.NET 1.0
- Seamless integration with SQL Server
- Creating bound controls is much easier
- The DataSet and DataTable classes are similar to
those found in Visual Studio 2003 - The DataGridView control replaces the DataGrid
control
31Data Sources Window
Data Sources Windowshows data sourcesavailable
to the project
Server data, local data, Web services, and
custom business objects can be data sources
32Dataset Designer
33The DataNavigator Class
- Supplies a data navigation and data manipulation
user interface for bound controls - Supports navigation and editing methods
- Custom logic must be implemented to perform
editing actions - Binds to a DataConnector
34The DataConnector Class
- Its the plumbing to
- Bind to a data source
- And connect the data source to the forms control
instances - Once bound, the DataConnector provides all record
navigation and editing facilities
35The TableAdapter Class
- TableAdapters are designer generated components
- They are analogous to strongly typed data
adapters - A TableAdapter can contain multiple SELECT
statements instead of just one
36The Visual Studio Team System
- Team Architect
- Application modeling and deployment modeling
- Team Developer
- Code analysis and profiling
- Team Test
- Load testing and unit testing
37Release Schedule
- Beta 1 has been released
- Community Technology Previews are being released
monthly - Beta 2 should be available late March
- Final software available this fall?
- Longhorn will enter beta this fall too