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 is a link for it.

http://blogs.msdn.com/b/csharpfaq/archive/2004/03/07/85562.aspx


Also, I was giving some of the example to my friend Dharmendra where multiple inheritance can be a problem.The problem is called the diamond problem. Let me explain a bit. If you have class that is inherited from the more then one classes and If two classes have same signature function then for child class object, It is impossible to call specific parent class method.
Share:
Thursday, June 21, 2012

Color indication in Visual Studio 2012

Note: This post will be a part of Visual Studio 2012 series.
Before some days Microsoft has released the release candidate version of Visual Studio 2012. Today I got installed Visual Studio 2012 and once I loaded the visual studio 2012 first things I noticed that there is purple color blank strip is there at bottom. After doing some R and D on internet I have found that it is used for the different indication. The purple color indicates that there is no project loaded now.

Color Indication in visual studio 2012 Purple color for no project
Share:
Friday, May 25, 2012

ASP.NET Web API Basics

We have seen that now web is really becoming cross plate form and you can see your services or API can be exposed to any client. Till now one of big challenges is to choose platform for this kind of service. There are so many options available like web services, WCF services,Generic Handlers, directly writing responses on aspx page etc. There are plenty of options available and each one has their own pros and cons.  But now we have one simpler answer for that is ASP.NET Web API.

What is Web API?

ASP.NET Web API is a framework for building web API on the top of .NET framework. It’s a framework for building and consuming web services that can be use at broad range of clients like browsers,tablets phones etc. You can expose JSON or XML whatever you want to use.

Why to use Web API?

Think about a situation where a jQuery script that is making a ajax request and we need some thing who can expose data from the server to the client at that time WEB API can be very handy you can expose server data in XML or JSON form and you can make that call with simple http request. No lengthy code required to call WEB API.
Share:
Thursday, May 24, 2012

Extract to User Control in visual studio11

Note: This post will be part of Visual Studio 2012 feature series. As Visual studio 2011 beta is now known as Visual Studio 2012
I have been playing with Visual Studio 11 beta recently and everyday I am amazed with new features of it. Today I have found one more very useful feature Extract to User Control feature.

In large projects, we are having large pages and its always good to use  user control(.ascx) but sometimes we are so lazy to create user controls and we remain with the whole page and even we can’t reuse that code. In similar kind of situation ‘Extract to user control’ can be quite useful. Suppose we have long HTML mark up and we need to convert one div to user control and then we can do it very easily with Visual Studio 11 beta Extract to User Control feature.

You just need to select code you want there in user control and then you need to right click and click ‘Extract to User Control’ like below.

Extract to user control feature- What's new in visual studio 11 features
Share:
Wednesday, May 23, 2012

Browser selection in Visual Studio 11

This blog post will be a part of Visual Studio 2012 features series. As now Visual Studio 2011 beta know as Visual Studio 2012.

In the earlier version of the Visual Studio if you want to run your page in browser then you have to do it with view in browser. But now you have directly that on the Visual studio 2012 toolbar like below.

Visual Studio 2011 beta Broswer selection toolbar

Share:
Thursday, May 10, 2012

Image preview in solution explorer Visual Studio 2011 beta

Note: This post will be part of Visual Studio 2012 feature series. As Visual Studio 2011 beta is known as Visual Studio 2012.

Everyday I am using Microsoft Visual Studio 2011 beta and everyday I learn some cool feature of it. In today’s post I am going to explain one cool features of Visual Studio 2011 beta solution explorer. As a web developer we all want to see the image preview in solution explorer and visual studio 2011 beta is now having it. We can see image preview in solution explorer just like following.
Share:
Tuesday, May 8, 2012

Css Enhancement in Visual Studio 2011 beta

Note:This blog post will be part of Visual Studio 2012 feature series.As now visual studio 2011 beta is known as Visual Studio 2012.
In this post we are going to look at some of CSS enhancement features in Visual Studio 2011 beta. First thing you notice in Visual Studio 2011 is better intellisense for the CSS. Now same kind of intellisense are available which we are using for C# and other languages.

Better CSS Intellisense in Visual Studio 2011 Beta- Features of Visual Studio 2011

Another enhancement is color selection Visual Studio 2011 beta. Now it’s provides a Great Color picker to choose CSS colors as you want. You don’t have to rely on the Hexadecimal value for color.

image

Commenting and uncommenting in CSS is now very easy and can you with formatting toolbar like following.

Commenting and uncommenting features in Visual Studio 2011 beta

That’s it. Hope you liked it. Stay tuned for more..Till than happy programming.
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