I m 求助小组,目前还有其他小组。 我想把所有可能的群体写到“C#”类或某类,然后,在创建“I”时,其他团体只是修改“团体的收集”。
我的问题是,C#结构应当用于这一使用案例?
www.un.org/Depts/DGACM/index_spanish.htm Edit: Changed the question and some of the body for clear.
变化的点数是巨大的,但可以有限地进行。 考虑:
public enum SomeColors
{
Black,
blue,
red
}
为使用<条码>而汇编的另一组编中的法典,如:
public enum SomeColors
{
Black,
Green,
blue,
red
}
由于该数值为<代码>1 汇编成册,现值为<代码>。 绿色代码>,而SomeColors.blue
现为2
。
此外,如果我们改变第一个拥有相同资本的国家:
public enum SomeColors
{
Black,
Blue,
Red
}
然后,操作代码仍将有效,但再编将会产生编辑错误,如<代码>SomeColors。 蓝色代码>不可行。 另外,Enum.Parse
(在这种情况下,视个案敏感性确定而定)的工作,视操作守则可提供哪些版本的一些Colors而定。
然而,增加价值并不是一个突破性的变化。 如果我们先去做,然后改为:
public enum SomeColors
{
Black,
blue,
red,
green
}
然后,现有的所有法典都将是oka,但当然不知道<条码>绿色条码>。 页: 1 Enum.Parse 。
因此,如果你只想补充的话,如果你能够依靠没有人试图打<代码>。 缩略语
<代码>const值也是如此。
如果您的价值观需要随版本而变化,那么你应当使用:
public static class SomeColors
{
public static readonly int Black = 0;
public static readonly int Blue = 1;
public static readonly int Red = 2;
}
由于这些变化不是固定的,而是固定分配的田地,因此,这些田地将使用不同类别,而不是汇编成册,而改变该类的用途。 在某些情况下,可以通过将财产而不是田地制成来提供进一步的安全;特别是,如果你今后可能想要将计算财产制成,那么如果他们目前是田地,而不是已经是地产的话,那将是一个突破性的变化。
如果你想要在运行时间保持价值,那么你需要一个指数师的班子,该班子将进行扼杀,并恢复愤怒。
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...