if i want to use speech recognition in .NET 4.5, i would likely reference
System.Speech.
OTOH, if i want to use the sizeofoperator keyword, it is not necessary to add any reference/assembly/namespace because
sizeof is part of the c# language.
B-) Gerry Lowry, Chief Training Architect, Paradigm Mentors Learning never ends... +1 705-999-9195 wasaga beach, ontario canada TIMTOWTDI =.there is more than one way to do it
Contributor
2350 Points
1014 Posts
What reference should we add for async await in VS2011 Beta
Mar 24, 2012 04:11 PM|duttavr|LINK
What reference/assembly/namespace should we add to recognize async await operators in VS2011 ?
Star
14297 Points
5797 Posts
Re: What reference should we add for async await in VS2011 Beta
Mar 25, 2012 12:05 AM|gerrylowry|LINK
@ duttavr
i'm wondering why you ask? let me explain.
if i want to use speech recognition in .NET 4.5, i would likely reference System.Speech.
OTOH, if i want to use the sizeof operator keyword, it is not necessary to add any reference/assembly/namespace because sizeof is part of the c# language.
The same applies to the operator keyword await ... from http://msdn.microsoft.com/en-us/library/hh156528(v=vs.110).aspx, you will note that async modifier is a contextual keyword:
The asynchronous method in which await is used must be modified by the async keyword.
Such a method, defined by using the async modifier, and usually containing
one or more await expressions, is referred to as an async method.
sizeof, await, async, and other C# Keywords do not require any reference/assembly/namespace beause they are part of the c# language.
g.
References you may find useful:
http://msdn.microsoft.com/en-us/library/hh191443(v=vs.110).aspx
"Asynchronous Programming with Async and Await (C# and Visual Basic)"
http://msdn.microsoft.com/en-us/library/hh300224(v=vs.110).aspx
"Walkthrough: Writing an Async Program (C# and Visual Basic)"
http://msdn.microsoft.com/en-us/library/hh300224(v=vs.110).aspx#bkmk_addreference
"System.Net.Http"
http://msdn.microsoft.com/en-us/library/hh300224(v=vs.110).aspx#bkmk_addstatesanddirs
"using System.Net.Http;
using System.Net;
using System.IO;"
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.getasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.getbytearrayasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.getstreamasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.getstreamasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.postasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.putasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.sendasync(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.deleteasync(v=vs.110).aspx
Contributor
2350 Points
1014 Posts
Re: What reference should we add for async await in VS2011 Beta
Apr 02, 2012 09:50 AM|duttavr|LINK
I'm so sorry for the very late reply. Actually I solved it myself, but could not come back to this thread. Sorry for that.
That was my first async CTP program, actually it was my mystake I used await without async.
Many thanks for your reply.