.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Windows Form Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Listing Arabic Names of Month in ListBox

Posted By:Hefin Dsouza       Posted Date: August 14, 2009    Points: 10    Category: Windows Form Controls    URL: http://www.dotnetspark.com  
 

Using This Method you can retrive Month names and Days in Arabic Format.

In a Simple Code

My.Application.ChangeCulture("ar-SA")
Dim newname As String
For i As Integer = 1 To 12
Dim s As String = MonthName(i, True)
Dim nm() As Char = s.ToCharArray() 'Used for Reversing The Chars To Display in Right To Left Format.
Array.Reverse(nm)'Used for Reversing The Chars To Display in Right To Left Format.
For ij As Integer = 0 To nm.Length - 1'Used for Reversing The Chars To Display in Right To Left Format.
newname &= nm(ij)'Used for Reversing The Chars To Display in Right To Left Format.
Next
ListBox1.Items.Add(newname)
newname = ""
Next
For i As Integer = 1 To 7
ListBox2.Items.Add(DateAndTime.WeekdayName(i, True))
Next
Using This Technique you can display Months and Days of Any Country
You Just need to remember the Culture Name.Which You can find in the MSDN or On This Page
Here

Regards Hefin Dsouza

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend