Choose the full namespace/class/function in VB.NET
-edit- nevermind i was lucky and didnt need to change much and have this test开发者_StackOverflow中文版 working.
I am doing a quick test and i need to choose the full path to a function.
in C# i can write
namespace ABC { class DEF { static string Test() { return "A test"; } } }
and can access it with ABC.DEF.Test()
i tried
Namespace ABC
Partial Public Class DEF
Public Function Test(ByVal v As String) As String
Return "A Test"
End Function
End Class
End Namespace
and i got VBTest.ABC.DEF.Test()
. How do i get rid of VBTest which is the name of my project?
Look in the project properties under the Application
section - it will have a Root Namespace
entry that you can change (remove VBTest from it).
精彩评论