Showing posts with label C#.NET. Show all posts
Showing posts with label C#.NET. Show all posts
Friday, April 27, 2018

Flexible Object Mapping in Entity Framework Core 2.0

Entity Framework 2.0 is out for some time. If you don’t know Entity Framework 2.0 is a lightweight, extensible and Cross-Platform Object-relational mapper from Microsoft. It is a new version of Entity Framework which is now cross-platform and can now run now operating system like Linux, Mac etc.With...
Share:
Wednesday, March 29, 2017

New Features–Out Variables in C# 7.0

Prior to C# 7.0,  For out keyword, we need to define that variable earlier and then we were able to pass that variable as out reference arguments. But now with C# 7.0, You don’t need to declare the variable but you can use the variable which you have used in arguments. Following is a code showing...
Share:
Friday, October 2, 2015

Convert C# Object into JSON and vice versa using Jil

I have also written couple of posts about converting C# object into JSON and vice versa. Following is a list of post for the same. Converting a C# Object into JSON string How to convert C# object into JSON string with JSON.NET In this blog post we will learn about how we can convert C# object into...
Share:
Wednesday, July 22, 2015

Video - Difference between var and dynamic keyword C#

I have recently produced one video about difference between var and dynamic keyword. Please go through it and let me know how it was. You can find complete video at following URL. https://www.youtube.com/watch?v=FPNZ_sTfZBo Hope you like it. Stay tuned for more...
Share:
Sunday, April 19, 2015

Structure and Operator overloading in C#

Recently I have been playing with structure and It’s fun. In this blog post we are going to learn how we can use operator overloading with structure in C#.  You can find my blog post that I have already written about structure  at following location. Structure in C# Structure with constructor in C# Structure with Interface in C# So as usual I've created a console application to demonstrate...
Share:

Structure with Interface in C#

Recently I have been playing with Structure and it is fun. I have written couple of blog post about structure. Following are links for that. Structure in C# Structure with constructor in C# In this blog post we are going to learn how we can use structure with interface. So like earlier example I’ve created a console application. Now it’s time to write interface which we can implement with structure....
Share:
Friday, April 17, 2015

Structure with constructor in C#

Before some time , I have written basic introduction post about Structure in C#. In this blog post we are going to see how we can have constructor with Structure. As we all know structure is a value type so it stored on stack. So let’s create a structure like follow with constructor. public struct Customer { #region Fields public int CustomerId; public string FirstName; public string...
Share:
Wednesday, April 15, 2015

Structure in c#

In this blog post we are going to learn about Structure Data structure in C#. In C# Structure is value type which stores on Stack. It is a composite value type that contain other types. You can also create object of structure like class. In C# structure can  contains fields, properties, constants,...
Share:
Thursday, April 2, 2015

Quick Tip–How to get time difference in C#

Recently, One of the reader of this asked me about, how we can get time difference between two dates or two times? So I thought it will be a good idea to write a blog post about that. So that other use can also get benefit from that. For that I have created sample console application like below. using...
Share:
Saturday, January 24, 2015

Recent updates to C# 6.0 syntax with new version of Visual Studio 2015 CTP

This blog post is part of C# 6.0 Features Series. Recently, Microsoft has announced new version of Visual Studio 2015 and I have downloaded it. At the same time I was checking what’s new in Visual Studio 2015 CTP newer version and and I have found that suddenly my c# 6.0 new features solutions  stopped working. The first problem it got is with static class using features. Following was...
Share:
Thursday, January 8, 2015

C# 6.0–Dictionary Initializers

This blog post is part of C# 6.0 Features Series. As we know c# 6.0 provides some cool new features and syntax sugar. Dictionary Initializers is one of them.  Till C# 5.0 we used to have collection initializers for collections but now C# 6.0 provides new way of initializing dictionary . This initialization features is available for there collections which supports index. Following is a code...
Share:
Wednesday, January 7, 2015

C# 6.0–Expression Bodied Members

This blog post is part of C# 6.0 Features Series. There are lots of great features added to C# 6.0 and Expression bodied members are one of them. It’s provide great syntax sugar which will help you make your code more beautiful and readable.  In earlier versions of C# type definitions were always been tedious and we need to provide a curly braces and return type even if that function contains...
Share:
Sunday, January 4, 2015

Assembly Neutral Interface in ASP.NET 5(vNext)

CodeProject Recently Microsoft has open sourced it’s entire ASP.NET next version stack on GitHub and I have been closely watching this for a quite a some time to understand how they have created architecture of it and how they organize everything in such a large stack. I have seen  [AssemblyNeutral] attribute in few of interfaces and I was curious why it was required. So I dig into it and...
Share:

C# 6.0–New feature series

This post will be aggregator post for all C# 6.0 feature series. Here you can find all of my blog posts about what’s new in C# 6.0. Till now, I have written following blog posts. C# 6.0–nameof Operator C# 6.0–Auto implemented property initializer C# 6.0–Static class using statement C# 6.0–String Interpolation C# 6.0- Null Conditional Operator C# 6.0–Exception Filters C# 6.0–String Interpolation C#...
Share:
Saturday, January 3, 2015

C# 6.0–String Interpolation

This blog post is part of C# 6.0 Features Series. As we all know, C# 6.0 provides lots of small enhancements to the language and string interpolation is one of them. In this blog post we are going to learn how this small new feature can help us for string concatenation. So let’s take small example, Where I have created a new example of string concatenation. Following is a code for that. using System; namespace...
Share:
Thursday, January 1, 2015

C# 6.0–Exception Filters

This blog post is part of C# 6.0 Features Series. C# 6.0 contains lots of small features and one of them is Exception filters. It is already there with VB.NET earlier but now it is available in C# also. In exception filters now if exception is combined with Exception statement and If condition of if satisfy then it will execute that block. Let’s take a simple example to understand it better....
Share:
Tuesday, December 30, 2014

C# 6.0–Null conditional operator

This blog post is part of C# 6.0 Features Series. As we know there are lots of small features added in C# 6.0 and Null conditional operator is one of them. You can check null with specific conditions with Null conditional operator and this will definitely increase productivity of developers and there will be less lines of code. Let’s create example. Following are two classes I have created...
Share:
Sunday, December 28, 2014

C# 6.0–Static class using statement

This blog post is part of C# 6.0 Features Series. C# 6.0 version introduced lot of small features and one of that features is  using feature. Now with C# 6.0 you can use using statement which was not possible in earlier versions of  C#. Following is a example of using statement in C#. using static System.Console; namespace StaticClassUsing { class Program { static...
Share:

C# 6.0–Auto implemented property initializer

This blog post is part of C# 6.0 Features Series. As we all know C# 6.0 is there in preview mode and Microsoft has added few small features to C# 6.0 which helps  lot while you develop application. In today’s blog post we are going to learn one more small feature called “Auto implemented property initializers”. Developers working on C# used a automatic properties a lot and there has been...
Share:
Friday, December 26, 2014

C# 6.0–nameof Operator

This blog post is part of C# 6.0 Features Series. Microsoft announced the new version of C# 6.0 at the day of visual studio connect event on November. They have not added any big features to C# 6.0 but they have listened to community and added few small features which comes really handy. One of the that is nameof operator.  In this blog post we learn why nameof operator is very useful. Let’s...
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews