2
Answers

Public class not accessible

Silas Pereira

Silas Pereira

14y
3.6k
1
Hy guys,

I am having a weird situation with a behavior of this class, and I am not understanding the reason.

Could you please help me?

I have this Class Teste.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RMAFF.Engine
{
public class Teste
{
public int TesteFunction()
{
int teste = 10;

return teste;
}

}
}




And I am trying to access the function TesteFunction() in this other class Teste2.cs, but no success. I can access the class Teste, but I can't access the public function TesteFunction.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RMAFF.Engine
{
class Teste2
{
void caramba()
{
Teste.[the function do not appears here]
}
}
}



Thanks in advance.
Answers (2)