C# 6.0 – Using Static

Didactic Code

In this installment of my ongoing series covering likely C# 6 language features I’ll be covering one of the features listed as “Done” on the Language feature implementation status page: using static. The idea behind using static is to allow importing members from static classes thus removing the requirement to qualify every member of an imported class with its owner. For the F#ers reading this, using static brings open module to C#.

Consider a method that writes some text to the console:

In this example, we’ve had to specify the Console class three times. The using static feature we can simply invoke the WriteLine method:

The primary benefit in this contrived example is eliminating redundancy but consider a more practical example which makes use of some of System.Math’s members:

Here we’ve had to qualify both PI and Pow with the Math class. Granted, it only appears twice when calculating the area…

View original post 86 more words

C# 6.0 – nameof Expressions

Yes, this feature should’ve introduced ages ago

Didactic Code

This post covers a pre-release C# 6.0 feature. It’s possible that the final implementation may differ from what’s described here.

I’ve lost track of the number of times I’ve needed to pass along the name of something be it a property, method, or type. Historically we’ve relied on hard-coded strings to convey this information but as we’re all too well aware, relying on strings in such a manner is just asking for future problems. For a prime example, we need look no further than our old friend INotifyPropertyChanged.

Consider the following Circle class which typifies the basic INotifyPropertyChanged implementation pattern:

Although this class is pretty boilerplate, it highlights the problem well. First, we’ve violated the DRY principle by encoding a member name in a string. Next, we’ve introduced fragility by relying on the string always reflecting the property name exactly; should the property name ever change we need to…

View original post 492 more words

Evolution of .NET framework

Purnendu Chakrabortty

Microsoft is lauding a new technology, but is .NET really new? The underlying technologies of .NET have been with us for some time. This article explores the maturation of the technologies in and behind .NET.

The Microsoft .NET initiative is all-encompassing, ever-present, and in certain ways, brand-new—but the underlying technologies have been with us for some time. In this article, I’ll explore the evolutionary process that made .NET possible, from MS-DOS and the iterations of Windows to ActiveX. It’s all come together to culminate in .NET.

C:DOSRun (MS-DOS)
DOS carved its spot in computing history as the innovation that let regular folks use computers. Prior to that, no one user ever operated a computer. It was always operated by a team of users.

When DOS came out in 1981, a couple of companies (most notably, Novell) built software to let teams work on bundles of computers—the first PC-based networks. Other companies built products like Telix, PCBoard and Wildcat, enabling the building of the…

View original post 1,353 more words

2015 Preview : Visual Studio 2015 Preview

LGIT Smart Solutions

Game-changing software development coming up!

visual-studio-2013-logo1

I’m currently running Visual Studio 2012 on my laptop, believe it or not, however I’m very excited to know that the Visual Studio 2015 Preview version is now available for user testing purposes, and will be rolled in early 2015 for general use. Among the usual bells and whistles that come with any newer version of Visual Studio, for the very first time, this newer version of Visual Studio comes with feature list of Mac and Linux targeted environments, which will surely bring a huge smile to developers who would like to build .NET applications for their Linux based environments. This release again also comes hot on the heels of a recent announcement that Microsoft has now open-sourced the .NET Framework. Here is a brief feature list to watch out for in Visual Studio 2015.

View original post 238 more words

C# 6.0 – String Interpolation

Didactic Code

I really debated about whether I should write about C#’s upcoming string interpolation feature yet. On one hand it’s an interesting feature that I’m looking forward to. On the other hand, it has already been announced that the feature is going to change from its implementation in the current preview. With that in mind I decided that it’s interesting enough to go ahead and write about it using the current syntax but highlight how it will change, much like how it has been done in the feature description document.

When I first heard that string interpolation was coming to C# I immediately experienced flashbacks to the very early days of my career when I was working with some Perl scripts. I really hated working with the language but something that always stuck with me and I missed when jumping to other languages was its string interpolation feature.

At a…

View original post 632 more words

Russia Releases a Photo of a Fighter Jet Launching an Air to Air Missile at MH17

The fact that it’s photoshopped is obvious:

  • They used google maps and yandex maps
  • The fighter jet is way too close to fire a missile
  • It’s just too perfect, you have everything the fighter the “MH17”, flying missile

But those dumb idiots that concocted that “proof” didn’t even paste the right model of Boeing. On the picture it’s most likely Boeing 767-300 (however I’m not 100% sure), but the plane is definitely not MH17, because MH17 was Boeing 777-200ER and if you look at the schematic view it just doesn’t fit. Even if I got the measurements wrong. Boeing 777-200ER has very distinctly looking wings.

Now they have some “experts” deciding whether this picture is fake or not, whereas it should be obvious to anyone that it is!

Fighter Jet Shooting MH17

Blog at WordPress.com.

Up ↑