Convert Strings to Title Case Using ToTitleCase() in C#

Published: 06 March 2024
on channel: Paul D. Sheriff
115
3

Lesson: Convert Strings to Title Case Using ToTitleCase() in C#
Technologies: C# and .NET Core

Lesson Description
In this lesson you use the ToTitleCase() method to make the first letter of each word upper case and the rest lower case. You see the limitations of this method, and create your own ToTitleCase() method to change conjunctions such as 'and', and 'or' to be lower case.

Contents
Introduction 00:00
Prerequisites 00:08
Lesson Objectives 00:14
DEMO: Using the ToTitleCase() Method 00:26
DEMO: ToTitleCase() Does Not Convert Upper Case Words 01:29
DEMO: Before Calling ToTitleCase() Call ToLowerInvariant() 02:09
DEMO: ToTitleCase() Has Problems with Prefixes and Conjunctions 03:32
DEMO: Fix ToTitleCase() To Convert 'And' and 'Or' Correctly 04:24

Helpful Links
Samples and hands-on labs for this course: https://www.pdsa.com/YouTube

ToTitleCase() Method
https://learn.microsoft.com/en-us/dot...

Change Case in C#
https://learn.microsoft.com/en-us/dot...

String Handling Best Practices
https://learn.microsoft.com/en-us/dot...

#csharp #string #toupper #tolower #totitlecase #dotnet #dotnetcore #pdsa #pauldsheriff #pluralsight #youtube

Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.

Paul.Contact()
Website: https://www.pdsa.com
Email: [email protected]
LinkedIn:   / paulsheriff  
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff


Watch video Convert Strings to Title Case Using ToTitleCase() in C# online without registration, duration hours minute second in high quality. This video was added by user Paul D. Sheriff 06 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 115 once and liked it 3 people.