I have one class file JobSeekerBO it’s has variable
string _username = string.Empty;
string _password = string.Empty;
and i set value as below
public string Username
{
get { return _username; }
set { _username = value; }
}
public string Password
{
get { return _password; }
set { _password = value; }
}
but problem is that that variable i access in another class file class1.cs i create object of that class file
JobSeekerBO objBO = new JobSeekerBO();
but i can’t access Username and Password in class1.cs class file from my JobSeekerBO.cs file
I also try to make that variable public as per below
public string _username = string.Empty;
public string _password = string.Empty;
same class file varible without public access modifier we can access in file1.aspx.cs file
So please tell me how to access variable and method of one .cs file to another .cs file.

You can not access
_usernameand_passwordoutside your class because they are private by default. That means they are accessible only within the body of the class. But you have the Public properties whichsetsandgetsvalues on these fields. So you should use those public Properties.Assuming your class look like this
More about class fields here in msdn
EDIT: After looking at your code.
You are trying to set the Public property value in a wrong place. You can not do it there. You should do it in a method ( even in your Constructor is fine).