开发者

Super short and awesome variable name in C# [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

Probably a bit silly of a problem, but I have this one variable (a part of a library) that I am using all the time (it gives me access to a whole lot of properties and functions). I want it to be as short as possible, and,开发者_开发技巧 preferably, something easy to write. jQuery's "$" would be pretty great, but that doesn't work, neither do any numbers or symbols I tried. I could use something like "s", but I was hoping there'd be something even better (and something that's not just one boring Latin letter).

So what would be SO's best super-short-and-awesome variable name?


Because I have intellisense in Visual Studio and the C# compiler will not use more memory (produce larger MSIL) for code using a longer variable name, I would call it somethingMeaningful.


Obviously the best answer is to use a unicode snowman:


I'd also advise not to do that - it's much better to use a name that explains the purpose of the variable.

However in the spirit of answering the question: You could use underscore: _.

It's a valid variable name in C# (and many other langauges). This isn't a new idea by the way - I have seen some frameworks in C and Python that use underscore as a method that takes a string meaning this string should be localized.


RBDD. Stands for "Really Bad Design Decision." In fact, make it all lower case, to emphasize the "bad" part.

public static class rbdd
{
  // put bad stuff here
}


How about ssaa (short for super-short-and-awesome)?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜