0
好了,下面的Lex Li的建議,我嘗試使用其他LIB獲得的Oid名稱:#SnmpLib如何獲取Oid(#Snmp)的名稱?
這裏的樣本:
public static void Main(string[] args)
{
string oid = ".1.3.6.1.4.1";
IObjectRegistry registry = new ReloadableObjectRegistry(@"C:\Users\Fnizz\Desktop\MIBS_BARCO\");
IObjectTree tree = registry.Tree;
var o = tree.Search(ObjectIdentifier.Convert(oid));
string textual = o.AlternativeText;
Console.WriteLine(textual);
if (o.GetRemaining().Count == 0)
{
Console.WriteLine(o.Definition.Type.ToString());
}
Console.ReadKey();
}
不過不是來獲取值.iso.org.dod.internet.private.enterprises
我得到這個: .iso.3.6.1.4.1
好吧,我測試它。謝謝 – Florian 2012-02-28 09:40:55