asp.net mvc - Is it possible to create VB.net module-like in C# on .Net 3.5? -
I need to use some feature of VB.net that my asp.net MVC project . But I found that the C # module can not handle like VB.net does, please see the following code.
VB.Net - Globalization Project
Public Modules [Module Name] Public Structure Website Name = String = [My Website's Name] "End Modules
VB.Net - see asp.net MVC page
& lt;% @ namespace = "[ Globalization Project namespace] "%>
C #net - asp.net MVC View Page
& lt;% @ import namespace = "[Globalization Project namespace]"% <%> ;% = WebsiteName / / Error Since C # does not understand this statement%> <% = [module name]. Website name // This works fine & gt;;
I think That C # sees the modules like all classes Therefore, I can not call it directly without giving module name. Do you have any idea to solve this question?
PS.1 I know module OOP is not correct, but it is small and powerful.
PS.2 I use VBnet for the web site Because all the source codes will be generated by my custom macro, but I do not like to write the source code in VB.net. Therefore, I do not use the VBnet as the primary language of the ASP.NET MVC View page or other project Does
Thanks,
No, in C # VBnet does not equal the module.
(In VB Net, access will be fully qualified by the compiler.)
You are interested by Eric Lipartt, though "top level" methods in the future release Talking about the possibility of getting involved.
Comments
Post a Comment