我正在从 stackoverflow 上的用户那里改编这个 snmp 程序。我在 Visual Studio 2022 中创建了一个新项目,添加了所有依赖项。
当我编译时,我收到 6 条 IDE0090 消息,但我看不出问题是什么。我设置LangVersion为10。
谁能看出问题是什么吗?
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using SnmpSharpNet;
namespace Exemple2
{
class Program
{
static void Main(string[] args)
{
/* Get an SNMP Object
*/
SimpleSnmp snmpVerb = new SimpleSnmp("192.168.1.121", 161, "public");
if (!snmpVerb.Valid)
{
Console.WriteLine("Seems that IP or comunauty is not cool");
return;
}
/* Sample of simple Get usage on ifSpeed on interface 10
* TODO …Run Code Online (Sandbox Code Playgroud)