Author Topic: C# help  (Read 1099 times)

Yeah I didn't see your post Truce, sorry.

This was the part I was having problems with. Ty Truce, I will try that now.

This was the part I was having problems with. Ty Truce, I will try that now.

Here's a better explanation of why that is:

Code: [Select]
public class MyClass
{
// We create a string variable named "correctAddress" with the value
// "joe@example.com" to be used throughout this class only (private).
private string correctAddress = "joe@example.com";

// This function can be called by anything (public). It will return true or
// false (bool), and we ask for a string to be provided when this function
// is called. We store that string in a variable called "addressToCheck".
public bool VerifyEmailAddress(string addressToCheck)
{
// Simple equality test...
if(addressToCheck == correctAddress)
{
// Give a true value back.
return true;
}
// Otherwise...
else
{
// Give a false value back.
return false;
}
}
}

I should learn C++. :o


For some reason this was my thinking
Code: [Select]
public bool VerifyEmailAddress(string exampleAddress)  //Here it would compare the string exampleAddress with the new value going inside of the function
[code]
[/code]

I'm going over Java right now. :3

Can you make decent programs with Java? :o

Can you make decent programs with Java? :o

Sure. RuneScape and MineCraft were both made using Java.