'base' as a function parameter name in C# -
i following microsoft's naming guidelines, , using camelcase in function parameter naming. suppose use signature
public string writenumberinbase (int number, int base)
in method , compiler complaining parameter name because 'base' reserved keyword... there way can 'base' accepted parameter name?
try this:
public string writenumberinbase (int number, int @base) // ^ // @ sign used "escape" keywords
(as side note, in vb.net same putting keyword or reserved word in square brackets, e.g. [mybase]
.)
or alternatively, call parameter radix
instead of base
.
Comments
Post a Comment