建议活动预订系统的班级名称 [英] Suggest class names for an Event Booking system
问题描述
我正在用C#语言编写一个事件预订系统,这使我非常恼火,因为事件"和委托"是保留字. 委托"我已更改为与会者",但我想不出Event类(及其实例)的替代名称.我想出的最好的是发生",这是我喜欢的1970年代.另外,这些类将通过客户API公开,因此我必须使用专业术语.
I'm writing an Event Booking system in C#, which is vexing me greatly because "event" and "delegate" are reserved words. "Delegate" I've changed to "Attendee", but I can't think of an alternative name for the Event class (and instances thereof). The best I've come up with is "Happening", which is a little bit 1970s for my liking. Plus, the classes will be exposed via a customer API so I have to use professional terminology.
我们将不胜感激任何建议.
Any suggestions would be most gratefully received.
困扰我的主要是实例和参数的命名:
it is mainly the naming of instances and parameters that is bothering me:
public Booking CreateBooking(Event event, Person person);
推荐答案
如果您确实要使用C#保留字,则可以在其前面加上'@'.
If you really want to use a C# reserved word, you can prefix it with '@'.
例如
public class @class
{
...
}
谨慎使用...
这篇关于建议活动预订系统的班级名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!