Suppose that in the class named the ProductDB.cs I want to protect the
method logic from being accessed from other classes, but I still want to let
other classes to call the method. The protected method is:
private static ArrayList ReadProducts()
{
...all the logic to goes here
}
In order to let other classes to access this method I then create a public
method that just calls the private method, like:
public static ArrayList GetProducts()
{
return ReadProducts();
}
private static ArrayList ReadProducts()
{
...all the logic to goes here
}
Is it a good design for this idea?
Regards,
KenA