Saturday, January 30, 2010

How to Delete a row from datatable

dt.Rows[i].Delete();

Or

foreach (DataRow dr in dt.Rows)
{
if ((dr["Doc_Name"].ToString().Trim() == "RAJA".ToString()))
{
dr.Delete();

}
}
dt.AcceptChanges();

Hot Create Random Number Using C#

Random randNum = new Random();

int i = randNum.Next(0, 10);

Friday, January 8, 2010

Bug Fixing in .net

1) Microsoft company website not open&surfing


1. First Try Windows malicious Removal program

if it's not solve the problem try another option

2. Stop dns client service in local service

2) Error while trying to run project: cannot start debugging. The assembly to be debugged was built with a platform incopatible with the current system


But i figured out the probelm and it seems to be a bug in Visual Studio 2005.

There is something called as the configuration Manager where u can specify the the type of the target machine code u want .. say X86 or X64. There is also this ANY CPU option( default).

But looks like there is a goof up in the menu associated and if u select the target machine to be X64 u get an exe which can run on any cpu and if the setting is is ANY CPU u can run it only on X64 !!!!!!