0条评论
还没有人评论过~
583行是C#8.0版本支持语法,这一句怎么修改可以兼容Unity,当前不兼容Unity.
[项目源码]https://github.com/twcclegg/libphonenumber-csharp/blob/master/csharp/PhoneNumbers/BuildMetadataFromXml.cs
只能這樣吧
if (element.Attribute(LOCAL_ONLY) is { })
{
var localLengths = element.Attribute(LOCAL_ONLY);
//...
}
var attr=element.Attribute(LOCAL_ONLY)
if (attr){
var v=localLengths.Value;
}