gpt4 book ai didi

entitykey - 如何获取EntityKey的值?

转载 作者:行者123 更新时间:2023-12-04 06:59:51 38 4
gpt4 key购买 nike

如何获取EntityKey的值?

我试过:

String x = Customer.EntityKey.EntityKeyValues[0].Value;

String x = Customer.EntityKey.EntityKeyValues[0].Value.ToString();

String x = Customer.EntityKey.EntityKeyValues;

String x = Customer.EntityKey.EntityKeyValues.ToString();

结束了:
你调用的对象是空的。

请帮忙。谢谢

最佳答案

正如您报告的那样,您收到了 Object reference not set to an instance of an object ,您可能需要检查 null引用;

String x = (Custormer == null ? null :
Customer.EntityKey == null ? null :
Customer.EntityKey.EntityKeyValues.Length == 0 ? null :
Customer.EntityKey.EntityKeyValues[0].Value);

关于entitykey - 如何获取EntityKey的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2049479/

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