假设有从1到8的章节。稍后,作者添加了7.5的条件奖金。
现在,我想做一些比较统一的章节命名,最初的想法是“0001章”。排序工作稳定(只要章节少于 10k,是的)排序直到出现奖励章节。
有没有人对如何命名章节有任何好主意,以便奖金(尤其是那些追溯添加的)不会破坏排序并落到最后或中间的某个地方?
PS:特别有趣的是,名称中的句点在//和这些操作系统上的不同应用程序中win排序unix不同android。

假设有从1到8的章节。稍后,作者添加了7.5的条件奖金。
现在,我想做一些比较统一的章节命名,最初的想法是“0001章”。排序工作稳定(只要章节少于 10k,是的)排序直到出现奖励章节。
有没有人对如何命名章节有任何好主意,以便奖金(尤其是那些追溯添加的)不会破坏排序并落到最后或中间的某个地方?
PS:特别有趣的是,名称中的句点在//和这些操作系统上的不同应用程序中win排序unix不同android。

让有一堂课
class Class
{
}
和属性
class SomePropertyAttribute : Attribute
{
public SomePropertyAttribute(string prop)
{
}
}
为什么编译器在将属性应用于这样的类时不会抛出错误
[SomeProperty(Weird)] //<-- Weird const use
class Class
{
private const string Weird = nameof(Weird);
}
?
实际上,在这种情况下,在定义类的花括号之外使用了一个私有常量。而文档(见私人)说:
private关键字是成员访问修饰符。
...
私有成员只能 在声明它们的类或结构的主体内访问...
isBlank 与 isEmpty 有什么区别?
如果string是引用类型,比如 and class,那么为什么 ystr1和有str2不同的值呢?理论上,两个变量都应该引用堆上的同一个内存区域,country1以及country2
static void Main(string[] args)
{
Country country1 = new Country();
country1.x = 1;
country1.y = 2;
Console.WriteLine("Country1 {0}, {1}", country1.x, country1.y);
Country country2 = new Country();
country2 = country1;
country1.x = 3;
Console.WriteLine("Country1 {0}, {1}", country1.x, country1.y);
Console.WriteLine("Country2 {0}, {1}", country2.x, country2.y);
///////////////////
string str1;
str1 = "123";
Console.WriteLine("Str1 {0}", str1);
string str2;
str2 = str1;
str1 = "1234";
Console.WriteLine("Str1 {0}", str1);
Console.WriteLine("Str2 {0}", str2);
}