المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : What is the *****alant to constant string array in C#?



C# Programming
11-04-2009, 08:31 AM
Suppose I have a byte from USB device which holds the day of the week (1 to 7)
I need to print out Sunday to Saturday based on values 1 to 7. I MCU I create a look up table of strings or string array in ROM and access with index.

What is the method here. I think it is enum. But from tutorials I cant figure out how to get a string from a number like indexing.

Please suggest best way here.

Thanks

With Regards
Roy Thomas

"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.