Conversion code snippets (35)

How to get array of values from Enum type

Published: 2. February 2014 | Updated: 2. February 2014
Categories: Enums
Tags: Array C# Conversion Enums

How to convert stream to bytes array

Published: 2. February 2014 | Updated: 2. February 2014
Categories: Converting Streams
Tags: C# Conversion

How to convert System.Drawing.Icon to WPF ImageSource

Published: 21. January 2014 | Updated: 21. January 2014
Categories: Converting WPF
Tags: C# Conversion GDI Media WPF

How to convert string to stream

Published: 11. January 2014 | Updated: 11. January 2014
Categories: Converting Streams
Tags: C# Conversion

How to convert string array to integer array

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

How to convert bytes to IntPtr

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

How to convert decimal to integer

Published: 30. November 2011 | Updated: 30. November 2011
Categories: Numbers
Tags: C# Conversion

How to convert string to enum

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

How to convert time to UTC

Published: 12. October 2011 | Updated: 3. November 2011
Categories: DateTime DateTime & TimeSpan
Tags: C# Conversion DateTime

How to convert time from UTC

Published: 12. October 2011 | Updated: 3. November 2011
Categories: DateTime DateTime & TimeSpan
Tags: DateTime C# Conversion

How to dynamically cast between built-in types in runtime

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

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 convert boolean to byte and vice versa

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

How to convert numbers to bytes and vice versa

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

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 convert time between two time zones

Published: 12. October 2011 | Updated: 26. October 2011
Categories: DateTime DateTime & TimeSpan
Tags: C# Conversion DateTime

How to convert hexadecimal number to integer

Published: 19. October 2011 | Updated: 26. October 2011
Categories: Numbers
Tags: C# Conversion Formatting Math

How to convert string to double

Published: 13. December 2008 | Updated: 26. October 2011
Categories: Numbers
Tags: C# Conversion

How to convert string to integer

Published: 13. December 2008 | Updated: 26. October 2011
Categories: Numbers
Tags: C# Conversion

How to convert a byte array to an integer

Published: 13. December 2008 | Updated: 26. October 2011
Categories: Numbers
Tags: C# Conversion

How to convert integer to hexadecimal number

Published: 19. October 2011 | Updated: 26. October 2011
Categories: Numbers
Tags: C# Conversion Formatting Math

How to convert DateTime to binary

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime Serialization

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 DateTime from binary

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime Serialization

How to convert DateTime to OLE Automation

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime Serialization

How to get DateTime from OLE Automation

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime Serialization

How to get DateTime from Windows file time

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows

How to convert DateTime to Windows file time

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows

How to convert Color to hex code

Published: 21. October 2011 | Updated: 26. October 2011
Categories: Colors
Tags: C# Colors Conversion Winforms WPF

How to get color from hex code

Published: 21. October 2011 | Updated: 26. October 2011
Categories: Colors
Tags: C# Colors Conversion Winforms WPF

How to get color from ARGB

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Colors
Tags: C# Colors Conversion Winforms WPF

How to get color from name

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Colors
Tags: C# Colors Conversion Winforms WPF

How to get color from ScRGB

Published: 24. October 2011 | Updated: 26. October 2011
Categories: Colors WPF
Tags: C# Colors Conversion WPF

How to convert character to hexadecimal equivalent

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