I was needed to convert an string array into the comma delimited string and the old way to do that is too with for loop. But I was sure that there should be some ready made function that will do this very easily.
After doing some research I have found string.Join. With the help of this we can easily an array into the comma delimited string.
String.join have two arguments one is separator and other...
Showing posts with label C#-4.0. Show all posts
Showing posts with label C#-4.0. Show all posts
Sunday, January 27, 2013
Friday, January 18, 2013
How to get N row from datatable in C#
Problem:
Recently one of my friend was needed only first three rows of data table and so he asked me and I have multiple solutions for that. So thought it would be great idea to share with you guys.
Possible Solutions to problem:
There are two ways to solve this problem.
With normal for loop
With lamda expression and linq
1. With normal for loop:
Following is code from where we can...
Friday, January 4, 2013
Lazy<T> in C# 4.0
Before C# 4.0 there was no on demand initialization by default. So at the time of declaration we need to create a value or object will be null or we have to create on demand initialization via coding.. But with C# 4.0 we now have lazy class. As per a href="http://msdn.microsoft.com/en-us/library/dd642331.aspx" target="_blank" title="Lazy MSDN it support lazy initialization so it means if we use...
Sunday, December 30, 2012
Lock keyword in C#
As we have written earlier we have now multi-core CPU for our computers and laptops and to utilize that we need to use threading in code. Now if we create thread and access same resource at same time then it will create a problem at that time locking become quite essential in any programming language.
Let’s consider a scenario. We are having a small firm of computers and each computer is shared...
Friday, June 22, 2012
Why C# does not support multiple inheritance?
Yesterday, One of my friends, Dharmendra ask me why C# does not support multiple inheritance. This is the question most of the people ask every time. So I thought it will be good to write a blog post about it. So why it does not support multiple inheritance?
I tried to dig into the problem and I have found the some of good links from C# team from Microsoft for why it’s not supported in it. Following...
Wednesday, September 14, 2011
BigInteger in C# 4.0
In C# 4.0 Microsoft has added so many features and I love all most all the features. In today’s post we are going to discuss BigInteger Class. During programming some complex systems often we need a very big numbers. For example if we use some of asymmetrical cryptographic feature which require to...
Sunday, August 28, 2011
Visual Studio 2010 Features post list on my blog
Before some days one of my friend asked me about my visual studio 2010 features list. So this post is about my visual studio 2010 post list. I have done lots of blog post about features of Visual Studio 2010 and Following is complete list of it.
Visual Studio 2010 Color Theme Editor-...
Wednesday, August 17, 2011
Creating Basic RSS Reader in ASP.NET MVC 3
In this post I am going to explain you how we can create a basic RSS Reader with the help of Linq-To-Xml and ASP.NET MVC3 Razor. Those who are writing or reading Blogs already knows what is RSS Reader. But those who does not know What is RSS. Below is the definition for RSS as per Wikipedia.
RSS...
Tuesday, August 16, 2011
Setting default value for @Html.EditorFor in asp.net mvc
Yesterday one of my friend asked me to set default value for @HTML.EditorFor in ASP.NET MVC. So I decided to write this blog post. In this blog post I am going to Explain How we create Default values for model Entities. So Let’s start this via taking a simple example Model class called User. In User...
Friday, July 22, 2011
Box Selection in Visual Studio 2010
Every day I am discovering something new with Visual Studio 2010 and In this post I am again going to explain you new interesting feature of Visual Studio 2010. We all required to modify the code in bulk some time and there is a new features for Visual Studio 2010 which enables to made changes in multiple...
Sunday, July 17, 2011
New Improved IntelliSense with Visual Studio 2010
I have posted lot many things about Visual Studio 2010 features because its a great IDE(Integrated Development Environment).Today I am going to write about IntelliSense improvement in Visual Studio 2010. Today when I was working with Visual Studio 2008 for a old project(Nowadays I am working with...
Thursday, June 9, 2011
Finding Saturday,Sunday between date range in C#/ASP.NET
I know this post will sound basic to some of the people. But yesterday one of my reader asked me this question. So I decided to write this blog post . So lets first create a console application which will find the Saturday,Sunday between two dates just like following.
Once you are ready with Console...
Monday, May 16, 2011
Playing with dapper Micro ORM and ASP.NET MVC 3.0
Some time ago Sam Saffron a lead developer from stackoverflow.com has made dapper micro ORM open source. This micro orm is specially developed for stackovewflow.com for keeping performance in mind. It’s very good single file which contains some cool functions which you can directly use in your browser....
Monday, April 18, 2011
Visual Studio 2010 and UML(Unified Modeling Language) Part-I
Microsoft Visual Studio 2010 comes with great UML Features I will explain them in details in future post. But In this post I am going to explain the UML concepts because its necessary to understand UML concepts before moving to Visual Studio 2010 part. I know this post may sound very basic to some...
Thursday, April 14, 2011
ExpandoObject class in C# 4.0
As you know till now in c# everything was static and known at design time. But with the C# 4.0 language Microsoft have enabled new dynamic data type which is belongs to Dynamic Language Runtime on top of CLR(Common language Runtime). As you know that dynamic object will know their behaviour at run...
Wednesday, April 13, 2011
Variable Reference Code Highlighting and Hide selection features of Visual Studio 2010.
Posted by Jalpesh Vadgama |
April 13, 2011 |
.NET4.0, C#-4.0, C#.NET, VB.NET, VisualStudio |
No comments
Microsoft Visual studio 2010 is a Great IDE(Integrated Development Environment) and I am exploring everyday something new in this blog post , I am also going to explore something new with Visual Studio 2010. There are two more new features that can make developers life easier. Let’s explore that in...
Monday, April 11, 2011
New search feature Navigate To in Visual Studio 2010
Posted by Jalpesh Vadgama |
April 11, 2011 |
.NET4.0, ASP.NET, ASP.NET-MVC, C#-4.0, C#.NET, VisualStudio |
2 comments
While you are doing code review then it is very necessary to search code and navigate code what you are reviewing and Navigate To feature of Visual Studio 2010 is made for the same. With the help of that feature you can easily navigate through code. You can go to Navigate Window via Edit-> Navigate...
Sunday, April 10, 2011
Pin features while debugging in Visual Studio 2010.
Posted by Jalpesh Vadgama |
April 10, 2011 |
.NET4.0, ASP.NET, C#-4.0, C#.NET, VisualStudio |
No comments
Visual Studio 2010 is one of most awesome tool to debug Microsoft.NET related code. I have found one more interesting feature with the Visual studio 2010. That is called Pin Data Tip feature. This features can be very useful when you are debugging the code with loops. Normally when you debug with the...