static method with private methods within it [C#] -


i wanted make class draw have static method consolesquare() , wanted make other methods in class hidden (private).but got errors in marked places , don't know how solve them , still achieve same idea ( consolesquare() - static ; other methods hidden )

class draw { private string spaces(int k){     string str="";     for(;k!=0;k--)         str+='\b';     return str;     } private string line(int n,char c){     string str="";     for(;n!=0;n--)         str+=c;     return str;     } public static void consolesquare(int n,char c){     string line  = line(n,c); // ovdje     string space = c + spaces(n - 2) + c; //ovdje     console.writeline(line);     (; n != 0; n--)         console.writeline(space);     console.writeline(line);     } } 

declare them private static.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -