Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with c#

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
vnlagrla
Cheater
Reputation: 0

Joined: 10 Apr 2011
Posts: 33

PostPosted: Tue Nov 15, 2011 8:02 pm    Post subject: Help with c# Reply with quote

I need to put in numbers and translate them to letters accordingly 1=a 2=b and so on.
it just returns string.empty so my question would be how can I change or set a string value that is already defined?
I have it set up like this

private void button2_Click(object sender, EventArgs e)
{

string text = string.Empty;
getText(text);
textBox14.Text = text;
}

public void getText(string retext)
{

if (checkBox6.Checked)
{
string leter1 = (textBox26.Text);
string leter2 = (textBox22.Text);
string leter3 = (textBox25.Text);
string leter4 = (textBox21.Text);
string nleter1 = string.Empty;
string nleter2 = string.Empty;
string nleter3 = string.Empty;
string nleter4 = string.Empty;
getValues(leter1, nleter1);
getValues(leter2, nleter2);
getValues(leter3, nleter3);
getValues(leter4, nleter4);
retext = nleter1 + nleter2 + nleter3 + nleter4;
}
}

public void getValues(string a, string b)
{
if (a == 1.ToString())
{
b = "a";
}
if (a == 2.ToString())
{
b = "b";
} //all the way till z
}
any help greatly appreciated I have about 2 hours to work on it more tomorrow and I hope I can get it done by then.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Wed Nov 16, 2011 12:31 am    Post subject: Reply with quote

Each letter in the alphabet has a value which is called an ASCII code.
For example, the letter 'a' has the value of 97 and 'b' value is 98 and so on . .
You can use those values to determine which letter is.

_________________
Stylo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites