C# Tips and Tricks Kansas

Learn some tips and tricks with the C# 3.0 language features along with exploring some productivity gains with the Visual Studio IDE.

Local Companies

Midwest CAM Solutions (GibbsCAM)
877-444-0982
NOW SERVING: KANSAS
Wichita, KS
Professional Software Inc
(316) 269-4264
800 E 1st St Ste 150
Wichita, KS
Radio Shack Dealer
(913) 755-2772
537 Main St
Osawatomie, KS
Jass Consulting Llc
(913) 837-5392
PO Box 1122
Louisburg, KS
Brainworks Software
(316) 722-8100
7570 W 21st St N
Wichita, KS
Mersoft Corporation
913-871-6196
9300 W. 110th Street
Overland Park, KS
Access Group LLC
(316) 264-0270
348 Ida St.
Wichita, KS
Allen Gibbs & Houlik L C Agh
(316) 267-7231
301 N Main St Ste 1700 Epic Center
Wichita, KS
First Student Inc
(913) 294-4425
1010 N Pearl St
Paola, KS
Backup Solutions
(316) 944-4448
2707 W Douglas Ave Ste B
Wichita, KS

As the title indicates, this article will be about C# tips and tricks. I'll cover some of the C# 3.0 language features, explore productivity gains with the Visual Studio 2008 C# IDE, and mention a couple of handy Visual Studio plug-ins that may be of interest. This deviates from the traditional articles I've presented in the past and will hopefully provide some value in its own way.



C# 3.0 Background



C# 3.0 was released as a part of the Microsoft .NET 3.5 Framework. The main purpose was to provide a foundation for Language INtegrated Query (LINQ) to provide unified data access capability. Each enhancement also can be used on its own. Here is a list of the features you'll cover and learn some related tips:




  • Automatically implemented properties

  • Using Keyword

  • Object and collection intitializers

  • Local type inference

  • Extension methods



Automatically Implemented Properties



Automatically implemented properties offer a concise syntax for implementing property accessors that get and set a private field. They create a field backed property without requiring you to actually create a field. The compiler automatically generates it for you at compile time. They can be used only for simple get and set of properties because there is no body and no field. No property body means no breakpoints or validation logic can be used. No field means no default value. Typing "prop [tab][tab]" is the Visual Studio code snippet for producing an automatically implemented property. This can make your code much more concise. A classic example of a field back property might look something like the code below.




private int myProperty = 0;
public int MyProperty
{
get { return this.myProperty; }
set { this.myProperty = value; }
}


Read the Rest of this Article at Developer.com

Featured Local Company

Mersoft Corporation

913-871-6196
9300 W. 110th Street
Overland Park, KS
http://www.mersoft.com

Related Local Event
Influencing without Authority
Dates: 12/3/2009 - 12/3/2009
Location: CMD Training Center WSU campus
Wichita, KS
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML