on the button click the below methods are fired, just change the email and reg code to make the if condition true please help me how i can make the flag true or if condition true thx
//Button code-------------------------------
private void button2_Click(object sender, EventArgs e)
{
//#----------put the email here and regcode and make the condition true;
CheckRegistration(
"your email [email protected]", "your reg code here");}
//---------------------------
public bool CheckRegistration(string _regMail, string _regCode)
{
bool flag = false;non = _regCode;
//#---------- you have to make this condition true
if (((_regMail.Length > 5) && (_regCode.Length > 7)) && GetRegCode(_regMail).Equals(_regCode)){
flag =
true; int k = 0;}
//#--------- Make this flag true...! MessageBox.Show(flag.ToString()); return flag;}
private static int ConvReg(char _c){
int num = 0x2a; char[] chArray = new char[] { 'q', '1', 'c', 'a', 'x', 'l', '-', '7', 'u', 'd', '3', 'b', '2', '9', 'n', 'g', 'f', 'v', 't', 'j', 'k', '5', 'm', 'e', 'o', 'p', '6', '@', 's', 'i', '8', 'h', 'w', '4', 'y', '_', '0', 'r', '.', 'z'};
for (int i = 0; i < chArray.Length; i++){
if (_c == chArray[i]){
num = i;
}
}
// MessageBox.Show(num.ToString()); return num;}
public static string GetRegCode(string _regMail)
{
string str = "2X"; if (_regMail.Length > 5){
char[] chArray = _regMail.ToLower().ToCharArray(); int index = _regMail.IndexOf("@");str = (((str + ConvReg(chArray[0]).ToString()) + ConvReg(chArray[1]).ToString() + ConvReg(chArray[index - 1]).ToString()) + _regMail.Length.ToString() + ConvReg(chArray[index + 1]).ToString()) + ConvReg(chArray[index + 2]).ToString() + ConvReg(chArray[_regMail.Length - 1]).ToString();
}
// MessageBox.Show(str+" <-->"+non); return str;}
Bechir BejaouiPosted Jun 28, 2008, 5:01 AM
method(type arg1,type arg2, out bool arg3);
{//to do implement the code}
when you call the method define a boolean variable but dont assign it
bool x;
method(arg1, arg2, out x);