Click here to Skip to main content
Email Password   helpLost your password?
View all surveys | Suggest a survey Suggest a survey

What new language features of .NET 3.5 do you use?

Survey period: 8 Jun 2009 to 15 Jun 2009

There's a little more icing on the cake in 3.5 but now that it's been released for a while, which of these features do you actually use?

OptionVotes% 
Automatic Property setters/getters61166.34611 votes, 66.34%
Lambda expressions48652.77486 votes, 52.77%
Object Initializers47451.47474 votes, 51.47%
Implicitly Typed Variables (var)46650.60466 votes, 50.60%
Query keywords (for LINQ)45749.62457 votes, 49.62%
Extension Methods45449.29454 votes, 49.29%
Collection Initializers36439.52364 votes, 39.52%
Anonymous Types32034.74320 votes, 34.74%
Partial methods17118.57171 votes, 18.57%
VB 'if' operator727.8272 votes, 7.82%
XML data types in VB414.4541 votes, 4.45%
Responses836  921 votes
This is a multiple choice question. Totals may not add up to 100%

View optional text answers (92 answers)


You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalasync methods and future variables
Corinna John
2:45 12 Jun '09  
I really like the new keyword async[^], though it is only available in Delphi Prism. The concept of futures[^] is just as nice. I hope both will make it into C# 4.
Here's a list of neat features[^] that are available in .NET 3.5, but tricky to use in C#.
I never would have thought I'd says that one day, but ... I'm beginning to like Prism... Rose

This statement is false.

GeneralYou can use some of that with .NET 2.0
harold aptroot
3:22 8 Jun '09  
You can, obviously you must set your "language version" to 3, but you can.
Sometimes you have to include a little something though, such as for Extension Methods you need somewhere in your code:
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class ExtensionAttribute : Attribute
{
public ExtensionAttribute() { }
}
}
And then it will work.


GeneralRe: You can use some of that with .NET 2.0
PIEBALDconsult
4:45 8 Jun '09  
And what will that give you? Does that simply allow you to mark methods as Extension Methods, compile with the C# 2.0 compiler, and run it against the .net 3.5 runtime?

If so, I'm all for it; I think that's the way Extension Methods should have been implemented, there was no need to alter the language.
GeneralRe: You can use some of that with .NET 2.0
harold aptroot
6:49 8 Jun '09  
It (also) allows to C#3 compiler to insert that attribute itself and then allows you to run it with the .NET 2.0 runtime and library.


GeneralRe: You can use some of that with .NET 2.0
PIEBALDconsult
9:40 8 Jun '09  
Including that snippet and compiling with CSC 3.5 results in:

warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\xt.cs'
and

xt.cs(26,42): warning CS0436: The type 'System.Runtime.CompilerServices.ExtensionAttribute' in 'c:\xt.cs' conflicts with the imported type 'System.Runtime.CompilerServices.ExtensionAttribute' in 'c:\Program Files\Reference
Assemblies\Microsoft\Framework\v3.5\System.Core.dll'
. Using the type defined in 'c:\xt.cs'.

and

xt.cs(26,10): error CS1112: Do not use 'System.Runtime.CompilerServices.ExtensionAttribute'. Use the 'this' keyword instead.
GeneralRe: You can use some of that with .NET 2.0
harold aptroot
9:42 8 Jun '09  
Well it would. You don't need this if you're already using the 3.5 assemblies. The whole point of this snippet is avoiding the 100MB download for your client while using Extension Methods anyway


GeneralRe: You can use some of that with .NET 2.0
PIEBALDconsult
10:02 8 Jun '09  
You deliver code that compiles with warnings? WTF

Extension Methods are unnecessary syntactic sugar and I see no reason to "avoid" .net 3.5, I simply install it on the systems that run my code.
GeneralRe: You can use some of that with .NET 2.0
harold aptroot
10:14 8 Jun '09  
It doesn't give warnings when you don't use the 3.5 libs
The reason to "avoid" it is that people generally don't want to download yet an other huge framework, it's usually hard enough to get people to agree to install 2.0


GeneralRe: You can use some of that with .NET 2.0
PIEBALDconsult
14:05 8 Jun '09  
harold aptroot wrote:
It doesn't give warnings when you don't use the 3.5 libs

How do you manage that?
GeneralRe: You can use some of that with .NET 2.0
harold aptroot
23:44 8 Jun '09  
Hm well, put your "language version" on 3, set your .NET target to 2.0, and just use an extension method (regular syntax)
I'm afraid the compiler doesn't want you to use the attribute yourself


GeneralWe're still using .NET 2.0!
Jason Barry
3:19 8 Jun '09  
At our office, we're still using .NET 2.0. I'm sure we'll upgrade to 3.0 sometime this year, but we're doing fine without it.
GeneralRe: We're still using .NET 2.0!
Vasudevan Deepak Kumar
5:44 11 Jun '09  
Jason Barry wrote:
.NET 2.0

You should feel better. A few in my region (Chennai, India) are to support clients still clinging onto 1.0 (not 1.1 even) framework.

Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!



GeneralWhat about an option for none?
hopingToCode
1:15 8 Jun '09  
I don't use any of them so would like an option to say none.
GeneralRe: What about an option for none?
Oshtri Deka
2:25 8 Jun '09  
Same here.


GeneralRe: What about an option for none?
John M. Drescher
2:31 8 Jun '09  
I do not use .NET so the answer is none.

John

GeneralRe: What about an option for none?
djj55
4:07 8 Jun '09  
Same here
GeneralRe: What about an option for none?
PIEBALDconsult
4:49 8 Jun '09  
Don't we all.
JokeRe: What about an option for none?
grgran
5:35 8 Jun '09  
Evil peopleses don't know what it missessess!
GeneralRe: What about an option for none?
RandyS
8:01 8 Jun '09  
Same here
GeneralRe: What about an option for none?
Paul Darlington
22:07 8 Jun '09  
I wish my company would move up to .NET we are still developing our internationally used product in C++ using Visual Studio 6.
So, sadly, its none for me too.
GeneralRe: What about an option for none?
Steve_Harris
23:09 8 Jun '09  
And me!


GeneralRe: What about an option for none?
Ashley van Gerven
15:58 9 Jun '09  
Isn't that like having an option on the Pizza hut menu 'No pizza' for $0.00? Poke tongue

"For fifty bucks I'd put my face in their soup and blow." - George Costanza
CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.

GeneralRe: What about an option for none?
hopingToCode
23:22 9 Jun '09  
No. The question here presupposes that you are using 3.5 what about an option to say we haven't felt the need to use any of the features so the survey can reflect that it's not being used and help MS focus on what features people are using, i.e. features from 3.0 and 2.0.
GeneralRe: What about an option for none?
Ashley van Gerven
16:39 10 Jun '09  
If you're not using .net 3.5 I don't know why you would want to vote on a survey specifically aimed at those that are using .net 3.5.

"For fifty bucks I'd put my face in their soup and blow." - George Costanza
CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.

GeneralRe: What about an option for none?
Shani Natav
20:57 10 Jun '09  
People love to see their post count Rise. So do I! Smile
To the point: You don't know what your'e missing...
I use all the features that are availabe in C#....


Last Updated 10 Aug 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010