C# 4.0 - Questions and reasons behind the answers
- Posted: Nov 11, 2008 at 9:15 AM
- 99,542 Views
- 14 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
- WMV (WMV Video)
The topic of "C# 4.0" is an area we've been diving into a bit lately. So we took this opportunity to sit down with Niner-regular Anders Hejlsberg and C# Community PM Charlie Calvert to dive into some of the most common questions we are hearing about C#
4.0 and the reasoning behind some of the answers.
If you are not familiar with C# 4.0 or want to dig into some other C# 4.0 resources, make sure to check out the following videos:
- [PDC] The future of C#, Anders Hejlsberg
- Inside C# 4.0
- C# 4.0: Meet the design team
Also make sure to check out Charlie's blog and some of the resources he and the team have made available on MSDN:
- New C# 4.0 Features Paper
- Covariance and Contravariance in C# 4.0
- Community Convergence 47
This is another Visual Studio 2010 and .NET Framework 4.0 Week Video. For other Visual Studio 2010 videos, check out the Visual Studio topic area here on Channel 9.
If you are not familiar with C# 4.0 or want to dig into some other C# 4.0 resources, make sure to check out the following videos:
- [PDC] The future of C#, Anders Hejlsberg
- Inside C# 4.0
- C# 4.0: Meet the design team
Also make sure to check out Charlie's blog and some of the resources he and the team have made available on MSDN:
- New C# 4.0 Features Paper
- Covariance and Contravariance in C# 4.0
- Community Convergence 47
This is another Visual Studio 2010 and .NET Framework 4.0 Week Video. For other Visual Studio 2010 videos, check out the Visual Studio topic area here on Channel 9.
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
I completely agree with the question on covariant return types. When I met Anders at the PDC bookstore I really tried to get the message across and I've been pushing the request for a long time (as have numerous other people in the community).
When can we have a downloadable document about the C#4 language? There is already one for C#3. I am looking forward for a downloadable document for C#4.
var xml =
@"<Users>
<User>user1</User>
<User>user2</User>
</Users>".ToXML();
Console.WriteLine(xml.ToString());
public static XElement ToXML(this string xmlString)
{
return XElement.Parse(xmlString);
}
But that lacks two major things, compiler support and designer support. Naturally, it becomes a slippery slope of what meta languages to support as the next question becomes support for JSON and M. I think M makes this more interesting as I think we will need compiler support for that. So should M, JSON, and XML have compiler support in c#? Why or why not? Could these be opt-in/opt-out extentions to the language?
No difficulties in having to line up ending tags. Its XML exploiting the C# parser.
Will Visual C++ status quote be enough to overcome the appeal of the D programming language in 2010?or is C# going to be unleashed?
Why doesn't Visual Studio provide for two forms of compilation. For example the exiting just in time and full compilation of the MSIL to machine code. I really see that C++ at this stage only serves for the purpose of maintaining legacy code. The incarnation of C++ was a hack and will continue to grow as a hack. .Net languages (in particular C#) for one should take full charge of future development in both desktop, web and yes system development. D programming language is already making an impression on a small but growing C++ community. D programming languages has syntactic appeal of C# and the horse power of C/C++. So what is the constraint, religion or technical feasibility. DotNet languages will be competing against the up an coming D programming languages sooner or later for development of system software and embedded systems. Again I say C++ is dead weight and should only be relevant for legacy code (in other words C++ will soon be Cobol). C# (all .net lingos) can easily take the manto if Visual Studio provided for this option and full support for "producing" applications that are true platform independent.
Well, I can see a some nice scenarios to use this.

OR even more useful, dynamics for class names also.
But I had hoped for something much more powerful
private string Foo(int x)
{
return x + 10;
}
public DoSomeThing(Method name)
{
var fooValue = name(10);
}
public Caller()
{
DoSomeThing("Foo");
}
That's what I call dynamic
Thanks for this discussion. As we train ourselves to think in terms of Abstraction when programming we many time find ourselves purposely genericizing the type. Passing objects in and out of methods becomes attractive with repsect to Abstraction. The problem of course is in the reconstruction of the Object into statically typed objects just for the sake of calling a method. As you mentioned using the Reflection class does indeed become messy (and actually predates things such as the HTML DOM (for example MethodInfo and FieldInfo) are not terms used within the HTMLDOM, so we have to convert mentally when trying to work with HTML DOM that a Reflection.MethodInfo = DOM.FiledAttirbute (or something similar). It requires speding too much time in the debugger's immediate window trying to ferret this stuff out. With Dynamic it looks like we will immensly ease this problem. Thanks again.
Remove this comment
Remove this thread
close