【发布时间】:2020-01-09 15:16:55
【问题描述】:
如何检查 ObjectIdentifier 是否是另一个 ObjectIdentifier 的父/根?
例如:
ObjectIdentifier rootId = ...;
Variable variable = ...;
if (rootId.IsRootOf(variable.Id))
{
// The variable's id is a child of root id!
}
我似乎在SnmpSharpNet 中找不到类似的方法。
【问题讨论】:
-
转换成字符串然后使用
.StartsWith.
标签: c# snmp snmpsharpnet