I can't seem to import a generic type on an ASP.Net page set to a language of "vb":
<%@ 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?
Yeah, bad news:
List<System.String>
, it would not throw the error. They left out VB again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.