Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

C# String

Explore string methods: create, search and change strings with built-in code.

String. You look into a reflecting pool. A message suddenly appears. It is a string written upon the water's surface. Strings have words and characters.

String methods. Usually strings do not appear in reflecting pools. But we can manipulate any C# string with methods. New strings are returned.

String interpolation. A string can be created with interpolated values in it. This is similar to string.Format but the syntax is different. We precede the string literal with a "$" sign.

Constructor. Strings are often reused, and passed around within a program. Methods like Replace() create new strings. But we can also create new ones with a constructor.

Literals. These specify string data. We use quotes around literal data (characters). Literals are embedded in the program executable.

Comparisons. Are two strings equal? In a Dictionary, we can use a StringComparer to change how keys are compared. We can ignore case.

Char. A string contains data made up of individual characters. We deal with these chars in looping constructs. Accessing chars is a fast way to test strings.

TextInfo. This type provides some helpful methods. We can convert a string To Title Case with ToTitleCase. No custom methods are needed.

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf