Welcome

This website is a mish mash of stuff that goes on in my life. I write it primarily for myself as a way of documenting and learning. If others benefit from it in any way that's great. View the categories to see the kind of areas I'm interested in and by all means contact me, I love hearing from people.

Recent Tweets (still don't get it)

Archive for Videos

Jun
30

Lambda Expressions in C#

Posted by: admin | Comments (0)

Lambda Expressions are new to C# from .Net 3.0 onwards. Their syntax often confuses those who come across them for the first time. In this video I take a look at them in their simplest form and do a comparison between using Lambda expressions versus using inline anonymous functions. Lambda expressions borrow somewhat from functional programming syntax and even logic and that may be part of the confusion.

The Lambda operator is =>
It can be called, “becomes” or “goes to” or “such that”. There is some debate out there as to how we should refer to it but I guess you could use all the phrases I mention depending on the context of your expression statement. Lambda types can be explicit or implicit. Again type inference leads to strongly typed objects that support full intellisense and type-safe attributes.

Author: Kieran Stafford (2008)
Video: Lambda Expressions in C# (.Net 3.0+)
Running time: 8 minutes
File size: 14MB
Download: Here
Categories : Videos
Comments (0)

In this video, I explore some of the possibilities of Language Integrated Query or LINQ which is one of the most talked about features to be added to .net 3.0 +. I will go through two examples of using LINQ, I start off with using it to query data held in memory from a simple array of integers. I then go on to demonstrate a classic scenario of using LINQ to query data from a Sql Server database (the famous Northwind db in this case).
During the course of this video, I touch briefly upon Lambda expressions, another new concept to c# from .Net 3.0 onwards. Lambda expressions delve somewhat into functional or declarative programming and as such can be confusing to some. So with that in mind it is probably beneficial to do the next video on them. I will try to keep it succinct, simple and as obvious as I can. Stay tuned.

I hope to keep this forum going and add a new tutorial video fairly regularly so please visit often for updates. Again -  I’d very much appreciate it if you would take the time to register as a member of this forum if you haven’t already done so and post some feedback on these videos. Where they good? bad? useful? accurate? helpful?, Can I do anything to improve them etc.

I have now fixed the bug whereby the intellisense popups were being omitted from the video. Also note that I have recorded this video at a screen resolution of 800×600 and then rendered the final wmv at the same size so the quality in this video is excellent. Try this video zoomed at 100% or even at full screen to get the best viewing experience.

Author: Kieran Stafford (2008)
Video: Using LINQ (language integrated query) in .Net with Visual Studio 2008
Running time: 24 minutes
File size: 25MB
Download: Here

Thanks to Ronan Geraghty from Microsoft for pointing out that LINQ is introduced in .NET 3.5 rather than .NET 3.0 so please forgive my mistake in the video.

Categories : Videos
Comments (1)

This is the first in a series of videos that I intend to create to coincide with the up coming launch of Visual Studio 2008. In this video I will take an in depth look and explain the following as best I can.

  • Auto properties
  • Object Initializers
  • Collection Initializers
  • Extension methods
  • The "var" keyword

I shall be adding more videos over the coming days to talk about some of the key new addons in VS2008 such as LINQ, Multi platform targeting, The IDE interface etc. I’d very much appreciate it if you would take the time to register as a member of this forum and post some feedback on these videos. Where they good? bad? useful? accurate? helpful?, Can I do anything to improve them etc.  Try this video zoomed at 200% or even at full screen to get the best viewing experience.

Author: Kieran Stafford (2008)
Video: New language features in VS 2008 (.Net 3.0 onwards)Download
Running time: 16 minutes
File size: 20MB
Download: Here
Categories : Videos
Comments (0)