Hey everyone! I recently moved from c++ to C# because i loved making windows applications. But i am having some problems (of course).

i made this thread to ask questions about problems i might have. My first one is about fucntions (at least its called functions in c++)

in c++ i could write a big block of code. f.eks.

void error() {
if(chances == 0) {
cout<<"You have no more chances.";
system("pause");
close();
}
else{
cout<<"The password is incorrect, please try again.";
chances --;
}
}

Now how would i create functions in C#?