gpt4 book ai didi

c# - 系统.Data.SqlClient。安装后无法使用

转载 作者:太空宇宙 更新时间:2023-11-03 14:58:54 25 4
gpt4 key购买 nike

我在使用 System.Data.SqlClient 时遇到问题。我通过 nugget search 安装它,但是当我进入我的项目时,它看起来我什至无法使用它。

using System;
using System.Data.SqlClient;
namespace dvadvanced
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
var buffer = new SqlConnection();
}
}
}

我添加了它,但是使用 System.Data.SqlClient 只是保持灰色,就像我没有它一样。

最佳答案

在使用程序集 System.Data.SqlClient 之前添加对 System.Data 的引用。

关于c# - 系统.Data.SqlClient。安装后无法使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47302946/

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