【发布时间】:2014-02-01 22:38:28
【问题描述】:
我有一个静态变量 -
static readonly String tableName;
我试着这样设置
static readonly String tableName = Dts.Variables["ssisString"].Value.ToString();
我收到一个错误:
An object reference is required for the non-static field, method, or property.
但是,它的工作原理是这样的:
static String tableName = "";
main()
{
tableName = Dts.Variables["ssisString"].Value.ToString();
}
为什么?
【问题讨论】:
-
@billinkc - 修复了这个问题。但错误仍然存在