使用C#我如何確保下面代碼中的'val'對象是小寫?將對象鍵轉換爲小寫
case MultiValueUpdateMode.AddIfNotExist:
if (value != null)
{
// Add the values only if they do not exist
foreach (var val in newValues)
{
if (!userDe.Properties["proxyAddresses"].Contains(val))
userDe.Properties["proxyAddresses"].Add(val);
}
}
break;
你沒有給我們足夠的信息,但是你可以使用ToLower將()擴展方法的字符串。 –