Namespaces in .NET can be very long and less obvious. There is a way to simplify this by creating your own alias for the namespace.
You can use the Imports statement (VB.NET) or using directive (C#) with an assignment operation.
' VB
Imports OldVB = Microsoft.VisualBasic
// C#
Using OldVB = Microsoft.VisualBasic;
That way, you can refer to specific class elements within the class referred to using the variable you created in the assignment operation.
' VB
Sub Test()
OldVB.MsgBox("asdfsad")
End Sub
// C#
void Test()
{
OldVB.MsgBox(“asdfsad");
}
Thank you! Thank you! I just finished reading this document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.
Darren D.
All Our Microsoft Access Products