Linked Questions
14 questions linked to/from .NET - How can you split a "caps" delimited string into an array?
137
votes
6
answers
75k
views
Insert spaces between words on a camel-cased token [duplicate]
Is there a nice function to to turn something like
FirstName
to this:
First Name?
6
votes
1
answer
7k
views
Split a Pascal-case string into logical set of words [duplicate]
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 ...
2
votes
1
answer
7k
views
How to get class property name with spaces? [duplicate]
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 ...
2
votes
1
answer
2k
views
Finding all substrings in a string c# (Regex, Char Array?) [duplicate]
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 ...
2
votes
4
answers
240
views
How to separate 1 string into multiple strings [duplicate]
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 = "...
600
votes
29
answers
451k
views
Getting attributes of Enum's value
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 ...
26
votes
4
answers
46k
views
WPF Data binding: How to data bind an enum to combo box using XAML? [duplicate]
I have a class:
public class AccountDetail
{
public DetailScope Scope
{
get { return scope; }
set { scope = value; }
}
public string Value
{
get { return ...
32
votes
6
answers
18k
views
EF5 Code First Enums and Lookup Tables
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 ...
11
votes
6
answers
12k
views
How do I programmatically change CamelCase names to displayable names
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
...
1
vote
5
answers
491
views
How can I tokenize this with a regex?
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 ...
2
votes
2
answers
974
views
Regex for a case change
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 ...
0
votes
3
answers
580
views
Adding space between a string (eg. HelloWord -> Hello World) [duplicate]
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 ...
2
votes
0
answers
1k
views
using IValueConverter Code Behind for ItemsSource
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?
...
0
votes
2
answers
668
views
how do you fill programmatically a selector using an enum with MVC in the view page with razor
I want to fill a selector using an enumerator. I want to do this operation in theView page with razor/VB or C#