Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我将我的代码设置为“STRICT”(Option Strict On)时,我收到以下错误:用于'&'的对象类型的操作数;可能会发生运行时错误。
这是有问题的行:
dataSet.Sort = CType(ViewState("sortExp") & DESCENDING, String)
只是想知道怎么了。谢谢
ViewState("sortExp")返回一个object. 与&您尝试连接DESCENDING(我假设它是一个字符串。)在严格模式下这是不允许的。尝试这个:
ViewState("sortExp")
object
&
DESCENDING
dataSet.Sort = ViewState("sortExp").ToString() & DESCENDING