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 7857065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:54:57+00:00 2026-06-02T20:54:57+00:00

This is really more of an academic question, but where is this function defined?

  • 0

This is really more of an academic question, but where is this function defined? Within .NET, I’m used to working in an object oriented manner. However, if I define a VB.NET class as follows:

Public Class foo
    Public Sub showmessagebox()
        Dim i As Integer
        i = MsgBox("Message")
    End Sub
End Class

Is MsgBox defined in a class? I am not required to reference a static class or inherit from another class. I’m not even required to import a namespace. I did find this link from msdn. But my question remains, where is this defined and how does the CLR just load up a function?

  • 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-06-02T20:54:58+00:00Added an answer on June 2, 2026 at 8:54 pm

    If you enter MsgBox into Visual Studio and hit F12, you will see that it is in the Microsoft.VisualBasic namespace, in the Interaction module.

    In fact, this information is also available (although a bit hidden) at the bottom of the MSDN page you referenced:

    Namespace: Microsoft.VisualBasic
    Module: Interaction
    Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

    If you look into the References section of your project properties, you’ll see that the Microsoft.VisualBasic namespace is automatically imported. Since Interaction is a module, you can use its methods without having to qualify the module name (as opposed to static/Shared methods of a class).

    As a side note: If you add a reference to Microsoft.VisualBasic.dll to a C# project, you can use Microsoft.VisualBasic.Interaction.MsgBox("Hello World"); there as well (although most C# users will prefer using the MessageBox class).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is really more of a serverfault/IT question, but I am not part of
So, this is a rails app but really more of a general ruby question:
This is really more a question of approach, but I'm presenting it in php.
This is not really a programming question, more of an algorithmic one. The problem:
This is more of a licencing issue than a code question. I really like
I use Java in this question but this really applies to all modern app
This is more of an academic curiosity but I'm trying to figure out how
This is more of an academic question about performance than a realistic 'what should
Somewhat of an academic question, but I ran into this while writing some unit
This is really more of a CSS question than a jQuery question. I'm using

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.