Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers: CSharp
Showing posts with label CSharp. Show all posts
Showing posts with label CSharp. Show all posts

What’s new in C# 6.0? - String Interpolation

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.



What’s new in C# 6.0? - Setting default values to Auto Properties

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.


How to create an Excel file using Silverlight and C#?

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.


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.


How to Search for File or Folder Programmatically?

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.


Interview Question: What is Yield Return? Let’s have fun with it

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.



Interview Question: What is Duck Typing?

“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.


What is AutoMapper and How to map two objects using AutoMapper?

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.


Interview Question: Difference between a struct and a class in C#

Welcome to the Interview Questions series on C#. Last week we discussed about “ref” and “out” keywords of C# with suitable example and I hope, that gave you clear understandings about those two parameter type.

 

This week we will discuss about struct and class as few people in Facebook asked me to clarify those two types.


Interview Question: Difference between the ref and out keywords in C#?

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.


What’s New in C# 5.0 - Learn about CallerFilePath Attribute

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.



What’s New in C# 5.0 - Learn about CallerLineNumber Attribute

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.


What’s New in C# 5.0 - Learn about CallerMemberName Attribute

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.


Evolution of C# (1.0 – 5.0) – What are the New Features Introduced in C#

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.


Microsoft Released Visual Studio Async CTP SP1

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.


Some Best Practices for C# Application Development (Explained)

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.



Some Best Practices for C# Application Development

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.


C# 4.0 New Features – Named and Optional Parameters

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.

 
© 2008-2017 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top