Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So I'm using a Global Resource file for all static messages within my site. Mainly error messages etc..

They do not need to be localized, but I felt it was just a good idea to store them all in one location.

Would it have been better to use just a static class called "SiteConstants" or something? Or is using a RESX file okay?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
773 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, use resource files …

That's the most common place for messages. Even Microsoft uses them with .net Framework. Look inside any DLL and you'll find them inside as resource (use a tool like .Net Reflector)

Constants are usually used with low level unmanaged code.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...