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 .
Categories: .NET, Windows Application Tags: application, c#, microsoft, Visual Studio, windows
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....Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: c#, Deprecated, Obsolete, Visual Studio
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....Categories: .NET, Visual Studio 2010, Windows Application, Windows Phone 7 Tags: Intellisense, microsoft, Visual Studio 2010, Windows Phone 7, XAML
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....Categories: .NET, C#, Visual Studio 2010, Windows Application, Windows Phone 7 Tags: c#, microsoft, Symbol, Visual Studio
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....Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: c#, default, Generic Code, keyword, switch
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....Categories: .NET, C#, Visual Studio 2010, Windows Application, Windows Phone 7 Tags: Checked Block, OverFlow Exception, project, Visual Studio 2010
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 .
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....Categories: .NET, ASP.NET, C#, Others, Visual Studio 2010, Windows Application Tags: .NET, Click Once, Developers, dotnet, google, installation, Kindle, Plugin
.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....Categories: .NET, C#, Entity Framework, Visual Studio 2010, Windows Application Tags: Entity Framework, Error, First, FirstOrDefault, LastOrDefault, LINQ, Top
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....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 ..
Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: .NET, Anil pai, Array, c#, ConvertAll, mscorlib.dll, System
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.
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 .???
Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: .NET Framework 4, 3.5 SP1, Abstract, Sams Publishing, Scott Dorman, Statistics
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 ...
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.
Categories: .NET, General, Visual Studio 2010, Windows Application Tags: installation, ManufactureR, rebuild, Senthil Kumar B, Solution Explorer, Visual Sudio 2010
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 .
Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: C# 4.0, GetEmployeeDetails, Method, named Parameters, Optional parameters, Visual Basic, Visual Studio 2010
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....Categories: .NET, ASP.NET, ASP.NET MVC, C#, F#, Visual Studio 2010, Windows Application Tags: .NET Framework 4, ASP.NET MVC, C# 4, demos, hands-on labs, June 2010 Release, Microsoft Download Center, presentations, Training Kit, Visual Basic 10, Visual Studio 2010, Visual Studio 2010 and .NET Framework 4 Training Kit, Web Forms4, Windows Communication Foundation
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....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....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.
Categories: .NET, C#, Visual Studio 2010, Windows Application Tags: c#, Implicitly Types Local Variables, LINQ, Local Type Inference, private, Scope, type, var, variable
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.
