Thursday 26 February 2015

member names cannot be the same as their enclosing type C#

Example:

Public  Classs  LoginDetails
{
       public LoginDetails()
      {
               //           Constructor
      }
     
      Public Void LoginDetails(string Uname,string Pwd )
      {
           // User defined method
      }
     
 }

Note: It Gives An Error .

Your class Name is  LoginDetails so this method can't also be named LoginDetails . You will have to change the name of the LoginDetails method to something else to make this code compile.

Thursday 5 February 2015

My Sql Generate DataBase Back Up Using C#.net

void GenerateScript()
{
    string constr = "server=localhost;user=root;pwd=root;database=myDataBase;";
    string file = "C:\\MyDumpFile.sql";
    MySqlBackup mb = new MySqlBackup(constr);
    mb.ExportInfo.FileName = file;
    mb.Export();
}