strconn的意义

来源:百度知道 编辑:UC知道 时间:2024/06/24 09:42:00
static string strconn = "data source=(local);initial catalog=gustbook;user id=sa;password=123456";
在这条连接数据库的语句中strconn的意义是什么?
我的意思是strconn中存储的内容是什么?

static string strconn = "data source=(local);initial catalog=gustbook;user id=sa;password=123456";

定义一个static(静态)的string类型(字符串类型)变量strconn(变量名),然后给静态变量strconn赋值

strconn的意义是什么?
由上可知strconn只是一个变量名,本身并不具有什么意义

问题补充:strconn中存储的内容是什么?
存储的就是一个字符串“data source=(local);initial catalog=gustbook;user id=sa;password=123456”
不要怀疑自己