gpt4 book ai didi

c# - 按属性名从列表中选择常量

转载 作者:太空宇宙 更新时间:2023-11-03 17:44:15 25 4
gpt4 key购买 nike

<分区>

public class Constants
{
public const string test1 = "This is testvalue1;"
public const string test2 = "This is testvalue1;"
public const string test3 = "This is testvalue1;"
public const string test4 = "This is testvalue1;"
public const string test5 = "This is testvalue1;"
}

是否可以通过使用 var propertyString = Constants.Where(<Propertyname> == test1).ToString() 以某种方式获取常量字符串? ?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com