Presenter:Mike Taulty
In C# version 3.0, a generic collection such as List
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Oh and will consist of a nugget session it s one in a series of short videos were spent on it and it is looking everythingisinsufficientstudio net framework minus m Tolkien I work in the developer and platform group in Microsoft in the UK and it is one of a series of short video is about prospective changes in version 3 of the sea shock language but his collectively come under the banner of language integrated query a link in his micro sessions under falling apart little syntax changes in sure mothers are in isolation collection initialises with the object initialises in the previous session and is very similar things will just follow on from that gain so if I m visual studio 2005 with even a preview of link and the seizure compiler and in previous session looked at reduced object initialises to initialise incidents with its news and activity on the screen hero in the
Minute 1
Mine and the collection initialise a similar thing now is he shall propose always been possible to initialise an array at the point where you declare it if I got like an integer array of us my integers I can declare that the new array 102030 and that he shall compile is happy enough as he declares me an array of length three now with the V3 preview compiler I ve got to do the same thing with a generic collection does they have got a list of integers residents have beenservers Milos s exact multiples and things of that list and everybody compile our then that s fine code and it works funny and everyone have a look at what s actually going on again using something like reflector on atlas just got back to
Minute 2
Folder with the project binary and it is reflected or eggs in project one Galaxy again and that other was going on and that main method then we can say that was really going on here is that we are just making explicit calls to the adolescent on the list so it is hardly what you would expect the compiler is just generating the code that you would otherwise have to type in an aversion to compiler so it s not particularly rocket science in order to do that method is to work the types that you are using needs to implement a high collection of tea so it needs to be a generic collection otherwise this one work and believe that is put on the right hand side you also need to be implicitly stubble to a tee so what does that mean wiping device for 40 5 F in their
Minute 3
Us listening is not an integer is a floaty one of and there is no implicit gas to make that work with you to explicitly cast in order to make that work similarly because of the high collection of tea restriction I couldn t be something like a rapist was bringing the othervertical arrow listed with new ones are as 203040 that summer to work and the reason why the woodwork is a rate list does not implement a high collection of tea so once again a fairly simple feature their if you have a collection that implements the generic and collection interface and you can initialise it all on a single line of code and once again on its others does not particularly exciting but it is combined with some of the other link features in order to come to something a bit more powerful but it s there is only used in a language without using any link small feature in and of itself
Minute 4
A short video and once again a short summary collection initialise is if you ve got some influence my collection of tea it allows you to create instantiate that collection and initialise its members on a single line of code working over more information a seizure of version 3 and language integrated query well as a site of MSDN link is there on the screen also if you follow that link you can find at the bottom of page and to see sharp version 3 language specifications and standards that they would give you all the information you need on what s happening in suit version 3 and if you want feedback on Sunday in a specific little video free to mail me I m just might not halt Microsoft com and that is what is listening and will catch you next
Click here to go to original video page
Wednesday, July 23, 2008
Video: C# Version 3.0 - Collection Initialisers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment