Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7444099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:26:21+00:00 2026-05-29T11:26:21+00:00

I am a VB.NET programmer by nature and I am having a hard time

  • 0

I am a VB.NET programmer by nature and I am having a hard time figuring this out. Any help with the following would be appreciated.

I need to get the C# code (1) below to work. The VB.NET equivalent works just fine, but the C# does not.

Note that both (2) and (3) do work, but this is actually auto-generated code, and I need the VB.NET and C# versions to be as similar as possible.

  1. This does not compile (the fully-qualified name of Engine is ThreeD.QVB.Engine):

    using ThreeD.QVB;
    
    namespace QVBScript
    {
        public class ScriptCode
        {
            public void Main(ref Engine.QVBObjectsDictionary objects,
                             Engine.Commands commands)
            {
                …
    
  2. However, this does work:

    //using ThreeD.QVB; // I'm instead using fully-qualified names in the method
    
    namespace QVBScript
    {
        public class ScriptCode
        {
            public void Main(ref ThreeD.QVB.Engine.QVBObjectsDictionary objects,
                            ThreeD.QVB.Engine.Commands commands)
            {
                …
    
  3. This works, too:

    using eng = ThreeD.QVB.Engine;
    
    namespace QVBScript
    {
        public class ScriptCode
        {
            public void Main(ref eng.QVBObjectsDictionary objects, 
                             eng.Commands commands)
            {
                …
    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:26:21+00:00Added an answer on May 29, 2026 at 11:26 am

    In VB.NET if you have an import for the first part of a namespace, you can reference just the later half. In C# you cannot do this. You must have a using for the full namespace, or fully qualify your type names. Different languages, different rules.

    In your last example you do not need to use the alias.

    using ThreeD.QVB.Engine;
    
    namespace QVBScript
    {
        public class ScriptCode
        {
            public void Main(ref QVBObjectsDictionary objects, Commands commands)
            {
                UI.Output Output = (UI.Output)objects["Output"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted this question: https://stackoverflow.com/questions/418597/java-and-net-for-php-programmer and the answers I was given didn't really help
I'm a .NET programmer and new to COM. Would like to know in simple
I'm a .net programmer vb & c#, but I can't seem to figure out
I'm a .NET programmer, and I'm developing a system that collects real time production
I'm vb.net programmer. I would like to start writing unit & user interface test
I'm ASP.NET programmer with no WinForms knowledge. I need to create a service that
I am not an experienced .Net programmer, hence this question. Is it a terribly
So, as a new .NET programmer I thought that the garbage collector would clean
I would like to think of myself as a somewhat experienced asp.net/c# programmer. I
I am .Net programmer who is looking to branch out and possibly use some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.