1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Enumのメンバ一覧をテキストのリストで取得する

1
Last updated at Posted at 2017-01-17
Class1.vb
''' <summary>
''' Enumから仕様書起こし用 ヘルパクラス
''' </summary>
''' <remarks></remarks>
<TestClass()>
Public Class EnumHelperClass

    ''' <summary>
    ''' DayOfWeek
    ''' </summary>
    ''' <remarks></remarks>
    <TestMethod()>
    Public Sub EnumDayOfWeek()
        Console.WriteLine("Enum DayOfWeek")
        Console.WriteLine("Member:Value")
        Console.WriteLine("------------")
        For Each rt As DayOfWeek In [Enum].GetValues(GetType(DayOfWeek))
            Console.WriteLine("{0}:{1}", rt.ToString(),
                              [Enum].Format(GetType(DayOfWeek), rt, "d"))
        Next
        Console.WriteLine("------------")
    End Sub
End Class
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?