Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I convert PascalCase to split words?

Tags:

c#

I have variables containing text such as:

ShowSummary
ShowDetails
AccountDetails

Is there a simple way function / method in C# that I can apply to these variables to yield:

"Show Summary"
"Show Details"
"Account Details"

I was wondering about an extension method but I've never coded one and I am not sure where to start.

like image 871
Samantha J T Star Avatar asked Jan 19 '26 09:01

Samantha J T Star


1 Answers

See this post by Jon Galloway and one by Phil

like image 56
Ashok Padmanabhan Avatar answered Jan 20 '26 21:01

Ashok Padmanabhan