Linked Questions

137 votes
6 answers
75k views

Is there a nice function to to turn something like FirstName to this: First Name?
Old Man's user avatar
  • 3,455
6 votes
1 answer
7k views

I would like to take a pascal-cased string like "CountOfWidgets" and convert it into something more user-friendly like "Count of Widgets" in C#. Multiple adjacent uppercase characters should be left ...
JoshL's user avatar
  • 11k
2 votes
1 answer
7k views

I have a class: MyClass { public int Id{set;get;} public string MollName{set;get;} public string MollAddress{set;get;} public string MollPRG{set;get;} } i use it for generate report in ...
Kliver Max's user avatar
  • 5,327
2 votes
1 answer
2k views

I need to identify substrings found in a string such as: "CityABCProcess Test" or "cityABCProcess Test" to yield : [ "City/city", "ABC", "Process", "Test" ] The first string in the substring can be ...
Pipeline's user avatar
  • 1,077
2 votes
4 answers
240 views

How do I convert "ThisIsMyTestString" into "This Is My Test String" using C#? Is there a fast way to do it? I've been thinking of a pseudo code but it's complicated and ugly: String s = "...
Dardar's user avatar
  • 781
600 votes
29 answers
451k views

I would like to know if it is possible to get attributes of the enum values and not of the enum itself? For example, suppose I have the following enum: using System.ComponentModel; // for ...
Alex K's user avatar
  • 11.3k
26 votes
4 answers
46k views

I have a class: public class AccountDetail { public DetailScope Scope { get { return scope; } set { scope = value; } } public string Value { get { return ...
Boris's user avatar
  • 10.3k
32 votes
6 answers
18k views

I'd like to define an enum for EF5 to use, and a corresponding lookup table. I know EF5 now supports enums, but out-of-the-box, it seems it only supports this at the object level, and does not by ...
Jerad Rose's user avatar
  • 15.5k
11 votes
6 answers
12k views

I would like to take a class name or enumeration name that is camel case and display it in normal text for the user. How can I programmatically do this? An sample input: MainPageBackgroundColor ...
Lance McCarthy's user avatar
1 vote
5 answers
491 views

Suppose I have strings like the following : OneTwo ThreeFour AnotherString DVDPlayer CDPlayer I know how to tokenize the camel-case ones, except the "DVDPlayer" and "CDPlayer". I know I could ...
Geo's user avatar
  • 97.6k
2 votes
2 answers
974 views

I am trying to get a string to have an underscore '_' everywhere on a case changes in a string to make it more clear to the user. For example if we have a String 'personal IDnumber', I want to make it ...
Sid's user avatar
  • 1,203
0 votes
3 answers
580 views

Let say I've a few string: CustomerName, CustomerID, ContactNumber,...How can I transform those string to Customer Name, Customer ID, Contact Number? Is there any built-in method can be used to ...
A_L's user avatar
  • 579
2 votes
0 answers
1k views

I am able to apply my IValueConverter which converters my enum and shows the Display-name Attribute on the xaml side. I'm wondering how would I do the same in code-behind? ...
Master's user avatar
  • 2,173
0 votes
2 answers
668 views

I want to fill a selector using an enumerator. I want to do this operation in theView page with razor/VB or C#
Marky68's user avatar
  • 95