Text code snippets (76)

How to encode unicode URL

Published: 5. February 2015 | Updated: 5. February 2015
Categories: Network
Tags: C# Network Text

How to parse URL query string

Published: 5. February 2015 | Updated: 5. February 2015
Categories: Network
Tags: C# Network Text

How to download and parse RSS feed

Published: 28. December 2014 | Updated: 28. December 2014
Categories: Network
Tags: C# Network Text XML

How to get (formatted) text from clipboard

Published: 26. September 2014 | Updated: 26. September 2014
Categories: Windows
Tags: C# Text Windows Winforms WPF

How to enumerate installed voices for speech synthesizer

Published: 26. September 2014 | Updated: 26. September 2014
Categories: Text
Tags: C# Media Text

How to speak text using speech synthesizer

Published: 26. September 2014 | Updated: 26. September 2014
Categories: Text
Tags: C# Media Text

How to compare strings in collection with ignoring the case

Published: 6. July 2014 | Updated: 6. July 2014
Categories: Linq
Tags: C# Collections Text

How to get display name (DisplayAttribute) from Enum value

Published: 9. March 2014 | Updated: 9. March 2014
Categories: Attributes Reflection
Tags: Attributes C# Enums Localization Text

How to convert Exception to string with stack trace and inner exceptions

Published: 9. March 2014 | Updated: 9. March 2014
Categories: Debug
Tags: C# Debug Formatting Text

How to count decimal places without trailing zeros

Published: 5. March 2014 | Updated: 5. March 2014
Categories: Math Regex
Tags: C# Math Regex Text

How to declare multiline strings

Published: 15. February 2012 | Updated: 15. February 2012
Categories: Basics Strings
Tags: Basics C# Text

How to convert string to char array and vice versa

Published: 15. February 2012 | Updated: 15. February 2012
Categories: Strings
Tags: Array Basics C# Text

How to truncate text

Published: 30. January 2012 | Updated: 30. January 2012
Categories: Strings
Tags: Basics C# Text

How to convert string array to integer array

Published: 1. December 2011 | Updated: 1. December 2011
Categories: Numbers
Tags: C# Conversion Text

How to remove formatting from numerical string

Published: 1. December 2011 | Updated: 1. December 2011
Categories: Strings
Tags: C# Formatting Text

How to generate random text

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Strings
Tags: C# Testing Text

How to repeat character

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Strings
Tags: C# Text

How to escape curly brace in String.Format

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Strings
Tags: C# Text

How to compare strings with ignoring the case

Published: 25. November 2011 | Updated: 25. November 2011
Categories: Strings
Tags: Basics C# Text

How to create path from strings parts

Published: 25. October 2011 | Updated: 25. November 2011
Categories: File system
Tags: C# File System Text

How to indent text in console applications

Published: 25. November 2011 | Updated: 25. November 2011
Categories: Consoles
Tags: C# Console Text

How to get new line

Published: 23. November 2011 | Updated: 23. November 2011
Categories: Strings
Tags: Basics C# Text

How to convert string to enum

Published: 23. November 2011 | Updated: 23. November 2011
Categories: Converting Enums
Tags: C# Enums Text Conversion

How to use and retrieve enum description attribute

Published: 4. November 2011 | Updated: 4. November 2011
Categories: Attributes Enums
Tags: Attributes C# Enums Text

How to append to a text file

Published: 3. November 2011 | Updated: 3. November 2011
Categories: Files
Tags: C# File System Text

How to convert string to bytes and vice versa for various encodings

Published: 2. November 2011 | Updated: 2. November 2011
Categories: Converting Strings
Tags: C# Conversion Text

How to get information about all encodings

Published: 2. November 2011 | Updated: 2. November 2011
Categories: Strings
Tags: C# Text

How to convert bytes to base-64 string and vice versa

Published: 2. November 2011 | Updated: 2. November 2011
Categories: Converting
Tags: C# Conversion Text

How to validate and parse decimal

Published: 1. November 2011 | Updated: 1. November 2011
Categories: Numbers
Tags: C# Conversion Text Validation

How to get Unicode Category for character

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is control

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is lowercase or uppercase

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is white space

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is separator

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is symbol

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is letter

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is digit

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to find out whether character is punctuation mark

Published: 31. October 2011 | Updated: 31. October 2011
Categories: Strings
Tags: Basics C# Text

How to validate DateTime

Published: 27. October 2011 | Updated: 27. October 2011
Categories: DateTime & TimeSpan
Tags: C# Text Validation

How to format a string

Published: 27. October 2011 | Updated: 27. October 2011
Categories: Strings
Tags: C# Formatting Text

How to format numbers

Published: 14. January 2009 | Updated: 26. October 2011
Categories: Strings
Tags: C# Formatting Text

How to get substring from text

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to convert string to lowercase

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to convert string to uppercase

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to trim string

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to get string length

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to replace specified string in string

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to get the last index of character in string

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to efficiently concat multiple strings

Published: 26. September 2011 | Updated: 26. October 2011
Categories: Strings
Tags: C# Performance Text

How to get the first index of character in string

Published: 14. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: Basics C# Text

How to escape string

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Strings
Tags: C# Text

How to replace text using regular expressions

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Regex
Tags: C# Regex Text

How to search text using regular expressions

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Regex
Tags: C# Regex Text

How to search text with named groups using regular expressions

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Regex
Tags: C# Regex Text

How to search multiple texts with named groups using regular expressions

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Regex
Tags: C# Regex Text

How to split text using regular expresions

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Regex
Tags: C# Regex Text

How to parse DateTime in exact/specific format

Published: 20. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime Text

How to get invalid path/filename characters

Published: 25. October 2011 | Updated: 25. October 2011
Categories: File system
Tags: C# Text

How to change file extension

Published: 25. October 2011 | Updated: 25. October 2011
Categories: Files
Tags: C# File System Text

How to parse path

Published: 25. October 2011 | Updated: 25. October 2011
Categories: File system
Tags: C# Text

How to escape/unescape string for url

Published: 19. October 2011 | Updated: 19. October 2011
Categories: Network
Tags: C# Text

How to convert character to hexadecimal equivalent

Published: 19. October 2011 | Updated: 19. October 2011
Categories: Converting
Tags: C# Conversion Text

How to format number as scientific/exponential

Published: 19. October 2011 | Updated: 19. October 2011
Categories: Math
Tags: C# Formatting Math Text

How to format number with leading zeros

Published: 14. October 2011 | Updated: 14. October 2011
Categories: Framework
Tags: C# Formatting Text

How to get input text in console application

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Consoles
Tags: C# Console Text

How to convert SecureString to string

Published: 30. September 2011 | Updated: 30. September 2011
Categories: Converting Security
Tags: C# Security Text Windows

How to render high quality antialiased text

Published: 27. January 2009 | Updated: 26. September 2011
Categories: GDI
Tags: C# GDI Text Winforms

How to save / load RTF document using RichTextBox

Published: 21. January 2009 | Updated: 21. January 2009
Categories: Winforms
Tags: C# Text Winforms

How to draw centered text

Published: 21. January 2009 | Updated: 21. January 2009
Categories: GDI
Tags: C# GDI Text Winforms

How to get installed fonts

Published: 20. January 2009 | Updated: 20. January 2009
Categories: Windows
Tags: C# Text Windows

How to protect data using user or machine credentials

Published: 5. January 2009 | Updated: 5. January 2009
Categories: Encryption Windows
Tags: C# Security Text Windows

How to parse connection string

Published: 22. December 2008 | Updated: 22. December 2008
Categories: Databases
Tags: C# SQL Text

How to get file extension

Published: 15. December 2008 | Updated: 15. December 2008
Categories: Files
Tags: C# File System Text Windows

How to read text from file

Published: 15. December 2008 | Updated: 15. December 2008
Categories: Files
Tags: C# File System Text

How to create MD5 from string

Published: 14. December 2008 | Updated: 14. December 2008
Categories: Security
Tags: C# Security Text