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

  • Home
  • SEARCH
  • 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 3321708
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:05:44+00:00 2026-05-17T23:05:44+00:00

Could anyone please give me a short working example of a C# class which

  • 0

Could anyone please give me a short working example of a C# class which can be compiled to a DLL, and an example of VB.NET-code creating an object based on this class and using its members (methods). The C# class has to have a namespace, at least one class definition (obviously) and some methods or whatever they ought to be called. I have someone else’s code of a C#-DLL but cannot see its members in my VB-project. I know I have to make a reference to the DLL in my VB.NET project. I’m using VB.NET Express 2008 and C# 2008 Express.

  • 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-17T23:05:45+00:00Added an answer on May 17, 2026 at 11:05 pm

    –foo.cs

    namespace Sharp
    {
        public class Foo
        {
            public string Message
            {
                get { return "This is from CSharp"; }
            }
        }
    }
    

    –bar.vb

    Namespace bartest
       Public Class Bar
    
         Public Shared Sub Main()
            Dim test as Sharp.Foo
            test = New Sharp.Foo()
            Console.WriteLine(test.Message)
    
         End Sub
    
      End Class
    End Namespace
    

    –batch file to compile

    %WINDIR%\Microsoft.NET\Framework\v3.5\csc.exe /target:library foo.cs 
    %WINDIR%\Microsoft.NET\Framework\v3.5\vbc.exe bar.vb /reference:foo.dll
    

    –run bar.exe

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

Sidebar

Related Questions

Could anyone could point me to some code/give me ideas on how to create
Could anyone can tell me where I can find full ASP.NET MVC beta documentation?
C#: Could anyone give me good example on how anchoring controls at runtime is
I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone
could anyone please show me how to write a generic success page which displays
Basically I am an android developer,now working in windows.Could anyone please let me know
Could anyone suggest a good packet sniffer class for c++? Looking for a easy
ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for
Could anyone please advise on the best method to detect whether a site is
Could anyone please show me how to read the extrinsic node below by 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.