Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

CSharp

Showing posts with label CSharp. Show all posts

C# 6.0 brought a set of most useful features with Visual Studio 2015 Preview and .NET 4.6. If you didn’t yet explore the features, check out the embedded links within this post to learn what’s coming with it. Download the preview to get your hands dirty before you use in production.

 

Today in this blog post, we will discuss about a new feature called “null-conditional operators”, which will actually improve your productivity. Let’s start with it.

Published by on under .Net | C# 6.0

Visual Studio 2015, .NET 4.6 and C# 6.0 came up with lot many features. If you didn’t try the new IDE, download the preview version in a non-production environment to get your hands dirty with it. You will definitely love the new features.

 

Today in this post we will learn about another new feature called “nameof” expression which will surely solve most of the problems a developer faces when playing with properties and notifications.

Published by on under .Net | C# 6.0

Did you download the new Visual Studio 2015 IDE? If not, try the preview version before it actually releases and start improving your coding skills with the forthcoming IDE from Microsoft. Today we are going to explore another new feature of C# 6.0 coming with this release.

 

Let’s continue the series “What’s new in C# 6.0?” and show you what’s coming with C# 6.0 in terms of string interpolation/string concatenation.

Published by on under .Net | C# 6.0

Did you try the new Visual Studio 2015 and .NET 4.6? At the time of writing this blog post, it’s still in “Preview” release for the developers to try and report issues. .NET 4.6 comes with C# 6.0 with additional new features expected by developers to improve their coding productivity.

 

We are now going to describe the new features introduced in C# 6.0. Today in this blog post, we are going to see how to initialize/set default values to auto properties introduced in C# 6.0. Keep reading.

Published by on under .Net | C# 6.0

Sometime we need to export data as Excel report. This can be a plain Console application or a high end desktop and/or web application. You can of course do this using plugins/add-ons but what if you don’t have permission to use any 3rd party assemblies in your application?

 

Okay, in this post we are going to discuss this with help of a simple Silverlight & C# application but logic will be same in other platforms/technologies too. Keep reading.

Published by on under .Net | CodeProject

How to Start, Stop, Recycle IIS application pool programmatically?

IIS application pool defines a set of web applications and their corresponding worker processes to provide a convenient way to administer a set of web sites and applications. Sometime developers need to programmatically start, stop or recycle the IIS application pool.

 

In this post, we will learn how to programmatically call the directory service to invoke the start, stop and recycle operation on IIS server.

Published by on under CSharp | DZone

Learning never ends, everyday we learn at least one thing. This applies to both our personal and programming stuffs. Today I learnt coding stuff which I wanted to build in one of my application. Thought to share the same in case you need, this will help you.

 

Did you ever think about building an application to provide a directory or file search functionality to the end user? .NET provides you that APIs which we will discuss in this post today.

Published by on under .Net | CSharp

logo

Yield is a contextual keyword available only in certain contextual statements, mainly interacts with the foreach loop. It allows each iteration in a foreach loop to be generated only when needed. In this way it improves the performance of the query.

 

Today we will discuss about it with a small funny code. Let’s see how much we actually know about this keyword. If you can answer the output of the code, you already know about it.

Published by on under .Net | CSharp

“Duck Typing” is not a common interview question but one of the interviewer in a panel may ask you this just to check your knowledge out of the common questionnaire. You might be already answered this in a different question but stucked here.

 

So, what is this “Duck Typing” and how this benefits a C# developer? Ok, let’s start discussing this in today’s blog post and I assume, you will find it interesting.

Published by on under .Net | C# 4.0

Many time we need to map objects between UI/Domain or Service/Domain layers. Mapping the objects between them is very hectic. So, are there any simplest mechanism by which I can map two objects? Is there is.

 

There is a AutoMapper class which you can use to map between two objects. This also provides option to do a custom mapping. Let’s begin with it and learn about it today.

Published by on under .Net | AutoMapper

Many time while working in our application module, we need to use “out” and “ref” parameters in various methods. Sometime you will face this question in front of interview panel too. So, what are those keywords and how they differ?

 

In this post, we will discuss the basics of C# to make you understand more about “out” and “ref” parameters which you will find useful.

Published by on under CSharp | Interview Questions

For last two days we learnt about the new attributes named “CallerMemberName” and “CallerLineNumber” introduced in CSharp 5.0.

 

Today in this post we will learn about another attribute named “CallerFilePath” which has been newly included in C# 5. Tune in to know about it with a simple example to trace the development issues that one source file can generate.

Published by on under .Net | C# 5.0

Yesterday we discussed about “CallerMemberName” attribute. If you didn’t read it, you can find it here: “What’s New in C# 5.0 - Learn about CallerMemberName Attribute”.

 

Today we will discuss about another attribute named “CallerLineNumberAttribute” that has been newly added in latest CSharp version i.e. C# 5.0. Tune in to learn about it’s feature and uses to trace our development issues. Don’t forget to ask your queries and leave a comment below if this post was helpful for you.

Published by on under .Net | C# 5.0

C# 5.0 comes with Visual Studio 2012 and .NET Framework 4.5. Currently it is in RC (Release Candidate) mode and will get the final RTM version soon. In our last CSharp blog post “Evolution of C# (1.0 – 5.0)”, we learned about the evolution of C# and also we also came to know about the main features introduced in each C# version.

 

Today in this post, we will learn about one new attribute that has been introduced in C# 5.0 named “CallerMemberName” for developers. Yes, it is for developers to trace the information about the caller code. Let’s begin discussing about it.

Published by on under .Net | C# 5.0

C# is not new to us. We are using it since Visual Studio 2002. Currently it is in released version 4.0 and C# 5.0 is on the way to release with Visual Studio 2012. Though we are using it since a long time, but many of us don’t know the new features that has been introduced in each new release.

 

This post will cover the “Evolution of C#” from version 1.0 to version 5.0 along with the new features and respective Visual Studio version. Bookmark this post for future reference and share it to your network and help others to know.

Published by on under .Net | C# 4.0

Visual Studio Async CTP Service Pack 1 has been released which extends Visual Studio 2010 which provides a new streamlined syntax for Asynchronous development. This version of Async CTP is compatible with Visual Studio 2010 SP1.

 

Read the complete post to find out the download link and installation instructions.

Published by on under .Net | Async

Few days ago, in one my earlier post, I listed “Some Best Practices for C# Application Development” from my past few years experience, which got a huge hit by my readers. I got several feedbacks on that too. Many of my readers gave valued suggestions too.

 

In this article, I will discuss most of those points. I will keep this article regularly updated with new best coding practices. Hope, I will get more feedbacks and/or suggestions here too.

Published by on under .Net | C# 4.0

imageFew days ago, in one my earlier post, I discussed about “Some Best Practices for Silverlight Application Development (XAML)” which got a huge hit by my readers. I got several feedbacks on that too. Someone from the community also suggested me to write some best coding practices on C#. This stroke my mind and hence decided to write some best practices about C# coding here from my past few years of experience.

 

For past few years, I learned a lot and tried to share best of them to the others who are new in the software development field. This post I contribute to those fellow members. Hope, I will get more feedbacks and/or suggestions here too.

Published by on under .Net | C# 4.0

In this post I will talk for one of the new feature in C# 4.0 – Named and Optional Parameter. Actually these are not a single feature but two different feature. You can get more benefit if you work with them together. So, what are those? Named parameter is a way to provide an parameter to the method using the name of the corresponding parameter instead of its position in the parameter list. Whereas, optional parameter allows you to omit arguments to member invocation.

Published by on under .Net | C# 4.0