If the user you're referring to will use your classes through an assembly-reference, you can prevent him from accessing a particular class by marking it as
internal[
^]. Internal types or members are accessible only within files in the same assembly.
If the user is able to put his code into the same assembly as your classes, then you
would have to make the class that he shouldn't use a private or protected nested class. But I wouldn't recommend doing that if this would serve only the purpose of "hiding" the class and not actually making sense in the context of your class design.
Edit:
namespace MyNamespace
{
public class demo1
{
private class demo2
{
public static int Myfunction2(int a, int b)
{
retutn a+b
}
}
public static int Myfunction1()
{
return demo2.Myfunction2(100,400);
}
}
}