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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:35:56+00:00 2026-06-11T00:35:56+00:00

I am using Window Application for my project. There is situation where i need

  • 0

I am using Window Application for my project. There is situation where i need to define string enum and using it in my project.

i.e.

Dim PersonalInfo As String = "Personal Info"
Dim Contanct As String = "Personal Contanct"

    Public Enum Test
        PersonalInfo
        Contanct
    End Enum

Now i want value of that variable PersonalInfo and Contract as “Personal Info” and “Personal Contanct”.

How can i get this value using ENUM? or anyother way to do it.

Thanks in advance…

  • 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-11T00:35:57+00:00Added an answer on June 11, 2026 at 12:35 am

    You could just create a new type

    ''' <completionlist cref="Test"/>
    Class Test
    
        Private Key As String
    
        Public Shared ReadOnly Contact  As Test = New Test("Personal Contanct")
        Public Shared ReadOnly PersonalInfo As Test = New Test("Personal Info")
    
        Private Sub New(key as String)
            Me.Key = key
        End Sub
    
        Public Overrides Function ToString() As String
            Return Me.Key
        End Function
    End Class
    

    and when you use it, it kinda looks like an enum:

    Sub Main
    
        DoSomething(Test.Contact)
        DoSomething(Test.PersonalInfo)
    
    End Sub
    
    Sub DoSomething(test As Test)
        Console.WriteLine(test.ToString())
    End Sub
    

    output:

    Personal Contanct
    Personal Info

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

Sidebar

Related Questions

I have developed a window application in VS2005 using C#. I need to integrate
I'm developing a Windows application in VS2005 using C#. In my project, I generate
I just designed a simple For Loop using window form application. I would like
I am working on window application using c# . i want to show my
Am building window form application for a clinic using VS2010. On the form in
I am using a window to change database configuration for my application. Settings button
I'm building a WinForms application Window (form), inside that I'm using a FlowLayoutPanel, with
I have a C# application using WPF consisting of a single Window holding four
I've generated a new Web Application project using GWT 2.0.4. I replace the onModuleLoad()
I am currently programming a ASP.NET MVC3 application, using Entity Framework 4. There are

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.