Windows Application

How to change the exe name of the Windows Application in Visual Studio 2010 ?

When you create a Windows Application in Visual Studio , by default , the name of the exe is the same name as the Project .Note that when you try to change or rename the project , still the exe name will be same . To change the exe name of the Application Name , you must change the Assembly Name which defaults to the Project Name .

Read more...

Be the first to comment - What do you think?
Posted by Senthil Kumar - June 14, 2011 at 8:58 pm

Categories: .NET, Windows Application   Tags: , , , ,

How to mark a method as Obsolete or Deprecated in C# ?

How can you mark a function or a method as deprecated in c# ? . You can do it in c# using the obsolete attribute . For Example : public class Employee { public string Name { get; set; } public void SetEmployeeName(string name) { Name = name; } } If you need to mark the method SetEmployeeName as deprecated , then , just include the obsolete attrbute before the functio Read More....

3 comments - What do you think?
Posted by Senthil Kumar - February 6, 2011 at 3:32 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , ,

How to view the XAML Code on the Intellisense popup in Visual Studio 2010 ?

Most of the Developers working on the Visual Studio would love the Intellisense feature that pops up and gives the list of suggested methods , events , properties etc and is useful too . But how do one view the sourcecode that is covered by the Intellisense window like the below screenshot of the XAML Code of Windows Phone 7 Application ? When the Intellisense is displayed , just press and hold the ctrl key . Th Read More....

Be the first to comment - What do you think?
Posted by Senthil Kumar - February 3, 2011 at 10:44 pm

Categories: .NET, Visual Studio 2010, Windows Application, Windows Phone 7   Tags: , , , ,

Install Windows Phone 7 Apps on Phone from unsupported Marketplace countries

Just a week back , i got my new Windows Phone 7 ( HTC Mozart 7 ) to get a feel of how the new Windows Phone 7 OS looks . The Phone looks amazing than my old WM 6 but yet looked like an empty box for a week . The Reason for this was lack of Market Place support currently in India to install the App , I was unable to install the apps and ended up getting the following error message. “marketplace is not yet avai Read More....

20 comments - What do you think?
Posted by Senthil Kumar - January 28, 2011 at 10:48 pm

Categories: .NET, Others, Windows Application   Tags: , , , , , , , , , , , , ,

3 uses of the @ Symbol in c#

1. You can use one of the reserved words of c# with the @ symbol Eg : string @int = "senthil kumar"; or something like this string @class ="MCA"; Although you can use this , avoid using one. 2. Before a string specially when using the file paths . You can use string filepath = @"D:\SENTHIL-DATA\myprofile.txt"; instead of string filepath = "D:\\SENTHIL-DATA\\myprofile.txt"; 3. For a Multi lined text strin Read More....

8 comments - What do you think?
Posted by Senthil Kumar - January 24, 2011 at 9:34 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application, Windows Phone 7   Tags: , , ,

default keyword in c#

The “Default” keyword in c# can be used in the following scenarios . The main use of default comes in to picture when used in the generic code. 1. To return Type’s Default Value The Default returns the type’s default value. For the Integer , it returns 0 , for Boolean , it returns false and for the reference types , it returns null int valueI = default(Int32); bool ValueB = default(Boolean) Read More....

6 comments - What do you think?
Posted by Senthil Kumar - January 21, 2011 at 9:06 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , ,

Why doesn’t this cause an Exception ?

I was trying to run the below code snippet in Visual Studio 2010 . int Number1 = 320000; int Number2 = 320000; int Number3 = Number1  * Number2 ; MessageBox.Show(Number3.ToString()); The code resulted in the value – 797966336 without being showing the error or the correct value . Just found that If you want an exception to be raised on this occassion , then use the following 2 options Read More....

1 comment - What do you think?
Posted by Senthil Kumar - January 18, 2011 at 8:52 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application, Windows Phone 7   Tags: , , ,

Microsoft Visual Studio 2010 Express for Windows Phone in a trial mode

Do you know , the Visual Studio 2010 Express for Windows Phone 7 runs in a kind of trial mode althought its free ?? I did not know this until i received the following message today . Microsoft Visual Studio 2010 Express for Windows Phone 7 will run for 22 more days .

Read more...

3 comments - What do you think?
Posted by Senthil Kumar - December 26, 2010 at 1:15 pm

Categories: .NET, Visual Studio 2010, Windows Application, Windows Phone 7   Tags: , , ,

Dotnet Developers – Did u notice the Google talk Plugin installer ???

Well , it we only recently that i noticed how the installation of google talk plugin inside the Gmail works . Well , the installation had some interesting information for .NET Developers . Just check the Installation screenshots that i took below . Well , It has the similar concept and the UI as the Click Once Deployment in .NET ) ClickOnce deployment makes things easier for installing the Application  for all Read More....

1 comment - What do you think?
Posted by Senthil Kumar - November 5, 2010 at 11:10 pm

Categories: .NET, ASP.NET, C#, Others, Visual Studio 2010, Windows Application   Tags: , , , , , , ,

.First() throws Error in LINQ or Entity Framework Queries

I use .First() method in some of the Entity Framework LINQ queries to return only one record . This works perfectly similar to the select Top 1 statemnent in SQL . Eg : var data = (from m in Employees     where m.Name == "Senthil"     select m).First() But , there is an issue with this . Assume your LINQ Query does not contain any Records or the SQL Statement ( TOP 1 ) does not return any records . What would Read More....

3 comments - What do you think?
Posted by Senthil Kumar - November 3, 2010 at 11:16 pm

Categories: .NET, C#, Entity Framework, Visual Studio 2010, Windows Application   Tags: , , , , , ,

Caught up with Bugs in My Favourite IDE ( Visual Studio 2010 )

Well , for the last few months i have been facing some serious issues in running Visual Studio 2010  as a result of some error messages / bugs . Here are some of the messages / bugs that i was able to capture .For some of the problems i was able to find the fix/update from the Microsoft Connect website , but for others i am still hunting for one  . 1. Catastrophic failure Puzzled , puzzled and Puzzled . Dont Read More....

3 comments - What do you think?
Posted by Senthil Kumar - October 19, 2010 at 9:25 pm

Categories: .NET, C#, Entity Framework, Visual Studio 2010, Windows Application   Tags: , , , , , , , , , , , ,

Using Array.ConvertAll to Convert an array of one type to another in C#

Thanks to one of My friend (Anil pai) , who asked me a question on how to convert a string array to an float/Double Array which made me to explore the possibilities in .NET and this is when i came across Array.ConvertAll The usual way of doing this is to parse and convert each values one by one like this ..

Read more...

1 comment - What do you think?
Posted by Senthil Kumar - September 5, 2010 at 7:16 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , , , ,

Visual Studio 2010 is faster if the Windows Automation API 3.0 is installed

Does your Visual Studio 2010 run slow ??? Here's David Berg , in his Developer Division Performance Engineering blog explains how to make your VisualStudio 2010 run faster on Windows XP machine by installing the new version of the Windows Automation API.

Read more...

2 comments - What do you think?
Posted by Senthil Kumar - August 17, 2010 at 10:50 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , , , ,

9th Edition of Microsoft’s Virtual Techdays

Microsoft Virtual Techdays is back . It is one of the India’s premier online technical event and this time its the 9th Edition and will be held from August 18-20 , 2010 . The Microsoft’s Virtual Techdays is an Online event and will have about 30 sessions everyday and is completely FREE. The tracks are categorized by targetting Developers , IT / Infrastructure Professionals , Enterprise Developers etc & Read More....

Be the first to comment - What do you think?
Posted by Senthil Kumar - August 13, 2010 at 11:33 pm

Categories: .NET, ASP.NET, ASP.NET MVC, C#, Compact Framework / Windows Mobile, Entity Framework, Events, F#, Mono, Security, Visual Studio 2010, Windows Application, Windows Phone 7   Tags: , , , , , , , , , , , , , , , , ,

Interesting Statistics on .NET Framework 4.0

Did you know how many classes and interfaces exists in .NET Frameworks 4.0 and how many of them are Sealed / Abstract .???

Read more...

1 comment - What do you think?
Posted by Senthil Kumar - July 13, 2010 at 11:34 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , , ,

How to Suppress Splash Screen in Visual Studio and SQL Server Management Studio Express ?

Most of the time , i feel frustrated with the load time of the Visual Studio and SQL Server Management Studio because of the Splash screen that takes a sometime before Visual Studio /SQL Server Management Studio Loads . It takes some 10 seconds for the splash screen to be loaded before the Visual Studio and SQL Server ...

Read more...

2 comments - What do you think?
Posted by Senthil Kumar - July 6, 2010 at 11:40 pm

Categories: .NET, Visual Studio 2010, Windows Application   Tags: , , , , , , ,

Error “The folder path ‘.’ contains an invalid character” in the setup projects

When a setup file is created in Visual Sudio 2010 and when we run the installation , it might result in the following error mesage: "The folder path '.' contains an invalid character" . Similar to the screenshot shown below.

Read more...

3 comments - What do you think?
Posted by Senthil Kumar - June 26, 2010 at 9:05 pm

Categories: .NET, General, Visual Studio 2010, Windows Application   Tags: , , , , ,

Optional and Named Parameters in C# 4.0

Optional parameters and named Parameters are the new features in C# 4.0.It provides the ability to define a parameter for a function with some default value. Visual Basic had the optional parameters and this is newly introduced in C# 4.0 .

Read more...

1 comment - What do you think?
Posted by Senthil Kumar - June 20, 2010 at 3:56 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , , , ,

Visual Studio 2010 and .NET Framework 4 Training Kit – June 2010 Release

The Visual Studio 2010 and .NET Framework 4 Training Kit includes presentations, hands-on labs, and demos that introduces or helps one to learn about Visual Studio 2010 features . The June 2010 Release of the Visual Studio 2010 and .NET Framework 4 Training Kit is now available for download . This covers some of the intro. topics like New features in Visual Studio 2010 New features in C# 4 and Visual Basic 10 Intr Read More....

Be the first to comment - What do you think?
Posted by Senthil Kumar - June 18, 2010 at 10:55 pm

Categories: .NET, ASP.NET, ASP.NET MVC, C#, F#, Visual Studio 2010, Windows Application   Tags: , , , , , , , , , , , , ,

Object and Collection Initializer in C#

The Object Initializer and Collection Initializer are similar to initialized Array and Object Constructor where we are able to set the properties of the newly created objects or multiple instances of the new object in essentially one line of code. Object initializers are similar to the constructors that populates the properties of the newly created instances of the object. Unlike the constructor,you can pick and ch Read More....

1 comment - What do you think?
Posted by Senthil Kumar - June 8, 2010 at 10:06 pm

Categories: C#, Visual Studio 2010, Windows Application   Tags: , , , , , , , , ,

Resources for learning ADO.NET Entity Framework

I’m planning to learn ADO.NET Entity Framework. So thought of sharing some nice links to learn Entity Framework . Here’s are some of the interesting one’s Blogs and Documentation MSDN ADO.NET Entity Framework Site MSDN Entity Framework Documentation Entity Framework Tips and Tricks LINQ to SQL vs. Entity Framework Checking out one of the new stored procedure features in EF4 NHibernate vs. Entity Fram Read More....

Be the first to comment - What do you think?
Posted by Senthil Kumar - June 5, 2010 at 1:27 pm

Categories: .NET, C#, F#, Visual Studio 2010, Windows Application   Tags: , , , , , , , ,

5 things that you cannot do with a Local Type Inference in C#

The Local Type Inference is also called as Implicitly Types Local Variables in C# and is an easy way to create a variable without having to know the type. This is especially useful when using a LINQ via the var keyword . The var keyword only works with the local scope , you cannot return or reference a variable created with the var ouside the scope of the local method.

Read more...

3 comments - What do you think?
Posted by Senthil Kumar - May 17, 2010 at 9:59 pm

Categories: .NET, C#, Visual Studio 2010, Windows Application   Tags: , , , , , , , ,

Code Access Security in .NET

This article is an introduction to the Code Access Security . Protecting resources from unauthorized use is what Code Access Security is all about . Both Role based and Code access security is based on the notion of the permissions. Permissions in the Role based security is about the authorized users to run the code.

Read more...

Be the first to comment - What do you think?
Posted by Senthil Kumar - March 28, 2010 at 8:44 pm

Categories: .NET, Security, Windows Application   Tags: , , , , , , , , , ,

AutoComplete Feature in Winforms

In one of my previous article AutoComplete is an ASP.NET using Ajax autocomplete extender i explained how to create AutoComplete TextBox in ASP .NET using AJAX , in this example i am achieving the same in Windows forms application . For this i've created a Autocomplete string collection containing names which will be shown in textbox as suggestions.

Read more...

2 comments - What do you think?
Posted by Senthil Kumar - August 31, 2009 at 8:04 pm

Categories: .NET, Windows Application   Tags: , , , , , , , , , , ,

© 2011-2012 Senthil Kumar's Blog This is my personal blog .The opinions expressed here represent my own and not those of my employer . All Rights Reserved -- Copyright notice by Blog Copyright