[英]Alias Generic Type With ASP.Net Import Directive in VB.Net Page
I can't seem to import a generic type on an ASP.Net page set to a language of "vb": 我似乎无法在设置为“ vb”语言的ASP.Net页面上导入通用类型:
<%@ Page Language="vb" %>
<%-- This works fine. --%>
<%@ Import Namespace="MyString=System.String" %>
<%-- This gives an error. --%>
<%@ Import Namespace="MyList=System.Collections.Generic.List(Of System.String)" %>
<%-- Error: "The 'namespace' attribute cannot contain spaces." --%>
Note that I'm NOT interested in these alternatives (for boring reasons you don't care about): 请注意,我对这些替代方案不感兴趣(由于您不关心的无聊原因):
Is it possible to alias a generic type on a VB.Net ASP.Net page, or is this an oversight by Microsoft? 是否可以在VB.Net ASP.Net页面上为通用类型添加别名,或者这是Microsoft的疏忽?
Yeah, bad news: 是的,坏消息:
List<System.String>
, it would not throw the error. List<System.String>
,因此不会引发错误。 They left out VB again.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.