Expression Bodied Functions and Properties in C# 6.0

Expression bodied functions are another syntax simplification in C# 6.0. These are functions with no statement body. Instead, you implement them with an expression, similar to Lamda expressions. class Calculator { public int Add(int a, int b) => a + b; public int Subtract(int a, int b) => a -...


Verify Internet connection is available using C#

While reviewing some code, I found a snippet for checking internet connection, like this private static bool IsConnectedtoInternet() { bool IsConnectedtoInternet; try { using (WebClient client = new WebClient()) { using (client.OpenRead("http://www.microsoft.com")) { IsConnectedtoInternet = true; } } } catch { IsConnectedtoInternet = false; } return IsConnectedtoInternet; } I found...


Dependency Injection in ASP.NET 5

Dependency injection is a software design pattern that implements inversion of control and allows a program design to follow the dependency inversion principle. An injection is the passing of a dependency (a service) to a dependent object (a client). The service is made part of the client’s state. Passing the...


New C# 6.0 features

As part of the Connect(); event, Microsoft introduced VS2015 Preview, which includes C# 6.0 with few more features. (These features are not included in my earlier post What is new in C# 6.0, as I already mentioned these features introduced by Microsoft in the Connect(); event few days back.) nameof...


First look into Visual Studio Community 2013

Yesterday Connect(); Event, Scott Guthrie and Soma Somasegar made a number of important announcements for the cloud-first, mobile-first developer. Visual Studio Community 2013 is a new free, fully-featured edition of Visual Studio that lets developers target any platform, from desktop and mobile to web and cloud. Visual Studio Community 2013...


K-MUG Usergroup Meeting on 29rd November Kochi

Kerala Microsoft User Group (K-MUG) is conducting monthly UG meeting on 29th November 2014, Kochi Agenda 09:30 - 09:40 Community updates 09:40 - 10:20 Continuous Integration & Build automation using Jenkins by Fazil VA 10:20 - 11:00 Source code automation using T4 Template by Sunij K 11:00 - 11:10 Tea...


POCO controllers in ASP.NET vNext

As part of ASP.NET MVC 6, Microsoft introduced POCO(Plain Old CLR Object) Controllers. Unlike MVC 5 or previous versions of MVC, POCO contollers, has no base class, no need to implement any interface, it is 100% convention. POCO controller implementation. using Microsoft.AspNet.Mvc; public class HomeController { public ActionResult Index() {...