0

i'm newbie from programming,
what i want to ask is
how to get the name from dayofweek??

For cacah = 0 To 6
                Dim nodeNamaHari As DayOfWeek
               [nodeNamaHari = cacah]
                Dim nodeJelasHari As TreeNode = nodeBulan.Nodes.Add(nodeNamaHari)
 Next

that's what i try
but the nodes appear just the value like 0 to 6 not
Monday
Tuesday
Wednesday and furthermore

Edited by __avd: Added [code] tags. Do wrap your programming code blocks within [code] tags.

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Riga
0

That doesnt work like this.
DayOfWeek is an ENUM...
try something like this:

Dim nodeNamaHari As DayOfWeek
For Each d In [Enum].GetNames(nodeNamaHari.GetType)
	nodeBulan.Nodes.Add(d)
Next

Edited by GeekByChoiCe: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.