我似乎无法在设置为"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." --%>
Run Code Online (Sandbox Code Playgroud)
请注意,我对这些替代品不感兴趣(因为你不关心的无聊原因):
是否可以在VB.Net ASP.Net页面上为通用类型添加别名,或者这是微软的疏忽?