Dot Net Stuff

Visual Studio 2015 Preview Comes with Emulator for Android, MVC6 and Entity Framework 7

Microsoft had launched Visual Studio 2015 Preview. Let try to know what's new in this release and point you more details. One of the other large announcements today is that we will open source the full server-side .NET core stack from ASP.NET 5 to the CLR and BCL and this version will run on Linux and MacOS X as well as Windows.

Since the majority of initial comments tend to be questions about supported configurations, I’ll put this up front: before you try to upgrade from Visual Studio "14" CTPs to Visual Studio 2015 Ultimate Preview, first uninstall Visual Studio "14" CTP – if you don’t, your system can wind up in an unstable state.

Continue Reading>>

Understanding Generic Anonymous Methods and Lambda Expressions in C#

Anonymous methods behave like regular methods except that they are unnamed. Anonymous Methods were introduced as an alternative to defining delegates that did very simple tasks, where full-blown methods amounted to more than just extra typing. Anonymous methods also evolved further into Lambda Expressions, which are even shorter methods.

Continue Reading>>

Understanding and Programming with Anonymous Types in C#

Anonymous types use the keyword var. Var is also used in Pascal and Delphi today, but var in Delphi is like ByRef in Visual Basic (VB) or ref in C#. The var introduced with .NET 3.5 indicates an anonymous type. Now, our VB friends are going to think, “Well, we have had variants for years in VB.” But var is not a dumbing down and clogging up of C#. Anonymous types are something new and necessary.

The simple meaning of Anonymous is that you don’t specify the type. You write var and C# figures out what type is defined by the right side, and C# emits (writes the code), indicating the type. From that point on, the type is strongly defined, checked by the compiler (not at runtime), and exists as a complete type in your code. There is one point to remember, you didn’t write the type definition; C# did.

Continue Reading>>