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.

No comments:

Post a Comment