Nomenclature of variables and methods in c#

Asked

Viewed 35 times

0

Hello folks today I noticed something curious in code snippet here at the company

Behold :

  private void Cadastro_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Acao) && Acao.Equals("Editar"))
            {
                CarregarInformações();
            }
        } 

Did you notice the CarregarInformações();

I’ve always been told not to use special characters to name variables and methods. but I do not know the explanation behind it all , this fact left me even more curious , after all why is it allowed to write in this way and that this is not a good practice ?

  • What is the source that says it’s bad practice? There’s an explanation of why? If you don’t know why something is, don’t believe it. Believing in good practice is not a good practice :P

  • 1

    @jbueno I swear I tried to find here rs this subject vlws =D

  • 1

    Tranquil @stringnome. Duplicates are good for the site, maybe other people will research how you researched and now they will find the correct answer =D. An important question is that you touched on the subject of "good practice" and maybe this can make your question different from the other...

  • Another important thing @stringnome. You don’t need to use the tag visual-studio when the question has no relation to the IDE. See that question

  • @jbueno is Ok

  • 1

    C# has special character support, but some languages do not, in this case, if you need to do some integration with a C# model that uses special characters this can cause some problems with the other language.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.