这是处理C# switch语句的适当方式吗?还是仍然需要明确使用break关键字? 参考
public static string ToRegistryString(AliceKey.AliceKeyPaths aliceKeyPath)
{
switch (aliceKeyPath)
{
case AliceKey.AliceKeyPaths.NET_CLR_DATA:
return @"\.NET CLR Data\";
case AliceKey.AliceKeyPaths.NET_CLR_NETWORKING:
return @"\.NET CLR Networking\";
case AliceKey.AliceKeyPaths.NET_DATA_PROVIDER_MSSQL:
return @"\.NET Data Provider for SqlServer\";
case AliceKey.AliceKeyPaths.NET_DATA_PROVIDER_ORACLE:
return @"\.NET Data Provider for Oracle\";
}
return new string(new char[0]);
}