我有这样的线。
string str = "ZeroIfNegative((NonApodCapacity()*0.65*0.9), 1) - ZeroIfNegative(P.BDFWU.dmd_dpt_fc + P.BDFW.dmd_dpt_fc - NonApodCapacity(1,2)*0.35)";我想对它进行相应的拆分,以获得与其参数一起使用的方法,例如
ar[0] = ZeroIfNegative((NonApodCapacity()*0.65*0.9), 1)
ar[1] = ZeroIfNegative(P.BDFWU.dmd_dpt_fc + P.BDFW.dmd_dpt_fc - NonApodCapacity(1,2)*0.35)内部方法也使用NonApodCapacity(1,2)作为另一个字符串。
基本上,我想用它的参数来验证这个方法名,这个参数也可以是一个方法。
发布于 2018-01-19 15:01:21
您可以使用C#拆分函数拆分字符串,例如
string str=“巴基斯坦是我的祖国”;
//在拆分函数中,您可以根据//您的要求传递空格或任何其他符号
string[] firstValue=str.Split(',');
https://stackoverflow.com/questions/48335483
复制相似问题