static question
-
I am not sure my code,Is it right? public class Macro_RemoveExcelDefaultGridLines { /// /// Excel Macro : Remove Microsoft Excel's Default Grid Lines /// private static string _Name = "RemoveDefaultGrid"; private static string _Body ="" + " Sub RemoveDefaultGrid()\n" + " Cells.Select\n" + " With ActiveWindow\n" + " .DisplayGridlines = False\n" + " .DisplayZeros = False\n" + " End With\n" + "End Sub\n"; public static string Name { get{return _Name;} } public static string Body { get{ return _Body;} } }
-
I am not sure my code,Is it right? public class Macro_RemoveExcelDefaultGridLines { /// /// Excel Macro : Remove Microsoft Excel's Default Grid Lines /// private static string _Name = "RemoveDefaultGrid"; private static string _Body ="" + " Sub RemoveDefaultGrid()\n" + " Cells.Select\n" + " With ActiveWindow\n" + " .DisplayGridlines = False\n" + " .DisplayZeros = False\n" + " End With\n" + "End Sub\n"; public static string Name { get{return _Name;} } public static string Body { get{ return _Body;} } }
-
My Excel macro is test in excel,my mean is i am not sure my c# class,I use static private variable and property,I think there is somthing wrong.
-
My Excel macro is test in excel,my mean is i am not sure my c# class,I use static private variable and property,I think there is somthing wrong.
I see nothing wrong with the code. Why do you think that there is something wrong with it? If the class is only supposed to be a container for those static properties, you should make it sealed so that it can't be inherited, and make an empty private constructor to override the default empty public constructor, so that it's obvious that one should not create instances of the class. --- b { font-weight: normal; }
-
I see nothing wrong with the code. Why do you think that there is something wrong with it? If the class is only supposed to be a container for those static properties, you should make it sealed so that it can't be inherited, and make an empty private constructor to override the default empty public constructor, so that it's obvious that one should not create instances of the class. --- b { font-weight: normal; }
-
I see nothing wrong with the code. Why do you think that there is something wrong with it? If the class is only supposed to be a container for those static properties, you should make it sealed so that it can't be inherited, and make an empty private constructor to override the default empty public constructor, so that it's obvious that one should not create instances of the class. --- b { font-weight: normal; }