C# code snippets (485)
How to declare multiline strings
Published: 15. February 2012 | Updated: 15. February 2012Categories: Basics Strings
Tags: Basics C# Text
How to convert string to char array and vice versa
Published: 15. February 2012 | Updated: 15. February 2012Categories: Strings
Tags: Array Basics C# Text
How to check for interface implementation
Published: 15. February 2012 | Updated: 15. February 2012Categories: Basics
Tags: Basics C#
How to calculate Fibonacci numbers/sequence
Published: 15. February 2012 | Updated: 15. February 2012Categories: Math
Tags: C# Math
How to get assembly attributes
Published: 15. February 2012 | Updated: 15. February 2012Categories: Attributes Reflection
Tags: Attributes C# Reflection
How to convert IEnumerable to IQueryable
Published: 14. February 2012 | Updated: 14. February 2012Categories: Linq
Tags: C# Collections Linq
How to create readonly collection
Published: 14. February 2012 | Updated: 14. February 2012Categories: Collections
Tags: C# Collections Linq
How to dynamically add generic condition to IQueryable
Published: 14. February 2012 | Updated: 14. February 2012Categories: Linq
Tags: C# Collections Linq
How to get bus info
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to get BIOS info
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate computer temperature sensors
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate motherboard devices
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate memory devices using WMI
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate windows services
Published: 12. February 2012 | Updated: 12. February 2012Categories: Services
Tags: C# Services Windows WMI
How to enumerate desktops using WMI
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate batteries using WMI
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate cdrom drives
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate page files
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate patches using WMI
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate windows groups
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate disk partitions
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate all directories in computer
Published: 12. February 2012 | Updated: 12. February 2012Categories: Directories Windows
Tags: C# File System Win32 Windows WMI
How to enumerate monitors using WMI
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate installed audio/video codecs
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Media Win32 Windows WMI
How to enumerate system drivers
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate physical media
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate keyboards
Published: 12. February 2012 | Updated: 12. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate windows threads
Published: 12. February 2012 | Updated: 12. February 2012Categories: Windows
Tags: C# Threading Win32 Windows WMI
How to enumerate system volumes
Published: 8. February 2012 | Updated: 8. February 2012Categories: Windows
Tags: C# Win32 Windows WMI
How to enumerate processors
Published: 8. February 2012 | Updated: 8. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to get running processes info
Published: 8. February 2012 | Updated: 8. February 2012Categories: Processes
Tags: C# Win32 Windows WMI
How to enumerate disk drives
Published: 8. February 2012 | Updated: 8. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate available printers
Published: 8. February 2012 | Updated: 8. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to enumerate sound devices
Published: 7. February 2012 | Updated: 7. February 2012Categories: Hardware
Tags: C# Hardware Windows WMI
How to get active window handle and title
Published: 7. February 2012 | Updated: 7. February 2012Categories: Win32 Windows
Tags: C# UI Win32 Windows
How to get installed software info
Published: 7. February 2012 | Updated: 7. February 2012Categories: Windows
Tags: C# Win32 Windows WMI
How to encrypt/decrypt using asymmetric algorithm RSA
Published: 7. February 2012 | Updated: 7. February 2012Categories: Encryption
Tags: C# Security
How to encrypt/decrypt using symmetric algorithm
Published: 2. February 2012 | Updated: 2. February 2012Categories: Encryption
Tags: C# Security
How to resolve IP address or host name
Published: 1. February 2012 | Updated: 1. February 2012Categories: Network
Tags: C# Network
How to implement thread safe Singleton
Published: 1. February 2012 | Updated: 1. February 2012Categories: Implementations
Tags: C# Design Patterns Threading
How to open message box
Published: 1. February 2012 | Updated: 1. February 2012Categories: Winforms WPF
Tags: C# UI Windows Winforms WPF
How to create and use inline functions
Published: 1. February 2012 | Updated: 1. February 2012Categories: Framework
Tags: C#
How to check that event log exists
Published: 1. February 2012 | Updated: 1. February 2012Categories: Debug Windows
Tags: C# Debug Windows
How to request for administrator permissions
Published: 31. January 2012 | Updated: 31. January 2012Categories: Windows
Tags: C# Security Windows
How to get domain controllers
Published: 31. January 2012 | Updated: 31. January 2012Categories: Network
Tags: C# Network Windows
How to exchange two numerical variables without the third var
Published: 31. January 2012 | Updated: 31. January 2012Categories: Framework
Tags: C#
How to open Folder Options window
Published: 31. January 2012 | Updated: 31. January 2012Categories: Win32 Windows
Tags: C# Win32 Windows
How to get computer user account names
Published: 31. January 2012 | Updated: 31. January 2012Categories: Windows
Tags: C# Windows WMI
How to enumerate local network computers using Active Directory
Published: 31. January 2012 | Updated: 31. January 2012Categories: Network
Tags: C# Network Windows
How to clone/copy struct
Published: 31. January 2012 | Updated: 31. January 2012Categories: Basics
Tags: Basics C#
How to truncate text
Published: 30. January 2012 | Updated: 30. January 2012Categories: Strings
Tags: Basics C# Text
How to remove milliseconds from DateTime
Published: 30. January 2012 | Updated: 30. January 2012Categories: DateTime & TimeSpan
Tags: C# DateTime
How to combine absolute and relative path/url
Published: 30. January 2012 | Updated: 30. January 2012Categories: File system Network
Tags: C# File System Network
How to merge two arrays
Published: 30. January 2012 | Updated: 30. January 2012Categories: Arrays
Tags: Array C#
How to resize array
Published: 30. January 2012 | Updated: 30. January 2012Categories: Arrays
Tags: Array C#
How to convert string array to integer array
Published: 1. December 2011 | Updated: 1. December 2011Categories: Numbers
Tags: C# Conversion Text
How to remove formatting from numerical string
Published: 1. December 2011 | Updated: 1. December 2011Categories: Strings
Tags: C# Formatting Text
How to convert bytes to IntPtr
Published: 1. December 2011 | Updated: 1. December 2011Categories: Converting
Tags: C# Conversion
How to get constructor using reflection
Published: 1. December 2011 | Updated: 1. December 2011Categories: Reflection
Tags: C# Reflection
How to create empty file
Published: 1. December 2011 | Updated: 1. December 2011Categories: Files
Tags: C# File System
How to reset color in Console
Published: 1. December 2011 | Updated: 1. December 2011Categories: Consoles
Tags: C# Colors Console
How to find out whether event handler is registered
Published: 30. November 2011 | Updated: 30. November 2011Categories: Events
Tags: C# Events
How to convert decimal to integer
Published: 30. November 2011 | Updated: 30. November 2011Categories: Numbers
Tags: C# Conversion
How to generate random text
Published: 30. November 2011 | Updated: 30. November 2011Categories: Strings
Tags: C# Testing Text
How to get assembly location
Published: 30. November 2011 | Updated: 30. November 2011Categories: Reflection
Tags: C# File System Reflection
How to repeat character
Published: 30. November 2011 | Updated: 30. November 2011Categories: Strings
Tags: C# Text
How to get object private fields
Published: 30. November 2011 | Updated: 30. November 2011Categories: Reflection
Tags: C# Reflection
How to clear event subscriptions
Published: 30. November 2011 | Updated: 30. November 2011Categories: Events
Tags: C# Events
How to delete readonly file
Published: 30. November 2011 | Updated: 30. November 2011Categories: Files
Tags: C# File System Windows
How to escape curly brace in String.Format
Published: 30. November 2011 | Updated: 30. November 2011Categories: Strings
Tags: C# Text
How to fire event
Published: 13. December 2008 | Updated: 26. November 2011Categories: Events
Tags: C# Delegates Events
How to compare strings with ignoring the case
Published: 25. November 2011 | Updated: 25. November 2011Categories: Strings
Tags: Basics C# Text
How to get stack trace frames
Published: 25. November 2011 | Updated: 25. November 2011Categories: Debug
Tags: C# Debug
How to use collection initializers
Published: 25. November 2011 | Updated: 25. November 2011Categories: Collections
Tags: C# Collections
How to use object initializers
Published: 25. November 2011 | Updated: 25. November 2011Categories: Framework
Tags: C#
How to create path from strings parts
Published: 25. October 2011 | Updated: 25. November 2011Categories: File system
Tags: C# File System Text
How to step through method in debug mode
Published: 25. November 2011 | Updated: 25. November 2011Categories: Attributes Debug
Tags: Attributes C# Debug Visual Studio
How to make custom formatting in debugger
Published: 25. November 2011 | Updated: 25. November 2011Categories: Attributes Debug
Tags: Attributes C# Debug Formatting Visual Studio
How to create conditional method
Published: 26. January 2009 | Updated: 25. November 2011Categories: Attributes Debug
Tags: Attributes C# Debug Testing
How to indent text in console applications
Published: 25. November 2011 | Updated: 25. November 2011Categories: Consoles
Tags: C# Console Text
How to create range of numbers
Published: 25. November 2011 | Updated: 25. November 2011Categories: Collections Math
Tags: C# Collections Math
How to get new line
Published: 23. November 2011 | Updated: 23. November 2011Categories: Strings
Tags: Basics C# Text
How to convert string to enum
Published: 23. November 2011 | Updated: 23. November 2011Categories: Converting
Tags: C# Conversion Enums Text
How to convert value type to nullable type
Published: 23. November 2011 | Updated: 23. November 2011Categories: Reflection
Tags: C# Reflection
How to get windows that are in taskbar
Published: 23. November 2011 | Updated: 23. November 2011Categories: Windows
Tags: C# Windows
How to get handle of WPF window
Published: 23. November 2011 | Updated: 23. November 2011Categories: WPF
Tags: C# Windows WPF
How to clone object
Published: 23. November 2011 | Updated: 23. November 2011Categories: Basics
Tags: Basics C#
How to get battery information
Published: 20. November 2011 | Updated: 20. November 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to find out whether pc is slow machine
Published: 19. November 2011 | Updated: 19. November 2011Categories: Hardware
Tags: C# Hardware Windows WPF
How to find out whether pc is tablet
Published: 19. November 2011 | Updated: 19. November 2011Categories: Windows WPF
Tags: C# Windows WPF
How to find out whether Windows UI effects are enabled
Published: 19. November 2011 | Updated: 19. November 2011Categories: Windows
Tags: C# UI Windows Winforms WPF
How to find out whether program is running in a remote session
Published: 19. November 2011 | Updated: 19. November 2011Categories: Win32 Windows
Tags: C# Win32 Windows Winforms WPF
How to sort objects using SortedList
Published: 13. December 2008 | Updated: 19. November 2011Categories: Collections
Tags: C# Collections
How to dynamically get/set member value
Published: 16. November 2011 | Updated: 16. November 2011Categories: Reflection
Tags: C# Reflection
How to make paging in collections
Published: 11. November 2011 | Updated: 11. November 2011Categories: Collections
Tags: C# Collections Linq
How to change cursor
Published: 14. December 2008 | Updated: 10. November 2011Categories: Winforms
Tags: C# UI Windows Winforms
How to subscribe to / unsubscribe from events
Published: 13. December 2008 | Updated: 10. November 2011Categories: Events
Tags: C# Delegates Events
How to write message to EventLog
Published: 13. December 2008 | Updated: 10. November 2011Categories: Debug Windows
Tags: C# Debug Windows
How to get distance between two points
Published: 13. December 2008 | Updated: 5. November 2011Categories: GDI Math
Tags: C# GDI Math Winforms WPF
How to use and retrieve enum description attribute
Published: 4. November 2011 | Updated: 4. November 2011Categories: Attributes Enums
Tags: Attributes C# Enums Text
How to calculate file checksum
Published: 4. November 2011 | Updated: 4. November 2011Categories: Files Security
Tags: C# File System Security Windows
How to terminate thread
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to convert time to UTC
Published: 12. October 2011 | Updated: 3. November 2011Categories: DateTime DateTime & TimeSpan
Tags: C# Conversion DateTime
How to convert time from UTC
Published: 12. October 2011 | Updated: 3. November 2011Categories: DateTime DateTime & TimeSpan
Tags: DateTime C# Conversion
How to get UTC date-time
Published: 12. October 2011 | Updated: 3. November 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to get distinct values from array/collection
Published: 9. October 2011 | Updated: 3. November 2011Categories: Arrays Linq
Tags: Array C# Linq
How to find out whether number is odd/even number
Published: 3. November 2011 | Updated: 3. November 2011Categories: Math
Tags: C# Math
How to dynamically cast between built-in types in runtime
Published: 2. November 2011 | Updated: 3. November 2011Categories: Converting
Tags: C# Conversion
How to append to a text file
Published: 3. November 2011 | Updated: 3. November 2011Categories: Files
Tags: C# File System Text
How to use variable number of arguments for method
Published: 3. November 2011 | Updated: 3. November 2011Categories: Framework
Tags: C#
How to use indexers
Published: 3. November 2011 | Updated: 3. November 2011Categories: Framework
Tags: C#
How to make internal members visible to another library
Published: 3. November 2011 | Updated: 3. November 2011Categories: Framework
Tags: C# Testing Visual Studio
How to find out whether thread is alive
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to find out whether thread belongs to the managed thread pool
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to get/set thread to background
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to get thread state
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to get/set thread priority
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to get/set thread name
Published: 3. November 2011 | Updated: 3. November 2011Categories: Threading
Tags: C# Threading
How to find out whether class is from startup assembly
Published: 2. November 2011 | Updated: 2. November 2011Categories: Reflection
Tags: C# Reflection
How to convert string to bytes and vice versa for various encodings
Published: 2. November 2011 | Updated: 2. November 2011Categories: Converting Strings
Tags: C# Conversion Text
How to get information about all encodings
Published: 2. November 2011 | Updated: 2. November 2011Categories: Strings
Tags: C# Text
How to convert boolean to byte and vice versa
Published: 2. November 2011 | Updated: 2. November 2011Categories: Converting
Tags: C# Conversion
How to convert numbers to bytes and vice versa
Published: 2. November 2011 | Updated: 2. November 2011Categories: Numbers
Tags: C# Conversion
How to check for DBNull value
Published: 26. January 2009 | Updated: 2. November 2011Categories: Databases
Tags: C# SQL
How to convert bytes to base-64 string and vice versa
Published: 2. November 2011 | Updated: 2. November 2011Categories: Converting
Tags: C# Conversion Text
How to create empty array
Published: 30. September 2011 | Updated: 1. November 2011Categories: Arrays
Tags: Array Basics C#
How to create unique id
Published: 1. November 2011 | Updated: 1. November 2011Categories: Basics
Tags: Basics C#
How to sort ObservableCollection
Published: 1. November 2011 | Updated: 1. November 2011Categories: Linq
Tags: C# Collections
How to validate and parse decimal
Published: 1. November 2011 | Updated: 1. November 2011Categories: Numbers
Tags: C# Conversion Text Validation
How to lock a file
Published: 9. October 2011 | Updated: 31. October 2011Categories: Windows
Tags: C# File System Windows
How to determine 32/64-bit system
Published: 16. January 2009 | Updated: 31. October 2011Categories: Windows
Tags: C# Windows
How to get Unicode Category for character
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is control
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is lowercase or uppercase
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is white space
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is separator
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is symbol
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is letter
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is digit
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to find out whether character is punctuation mark
Published: 31. October 2011 | Updated: 31. October 2011Categories: Strings
Tags: Basics C# Text
How to hide console window
Published: 31. October 2011 | Updated: 31. October 2011Categories: Consoles
Tags: C# Console Visual Studio
How to dispose object
Published: 31. October 2011 | Updated: 31. October 2011Categories: Basics
Tags: Basics C# Design Patterns
How to kill process by name
Published: 5. January 2009 | Updated: 27. October 2011Categories: Processes
Tags: C# Windows
How to enumerate event log entries
Published: 12. January 2009 | Updated: 27. October 2011Categories: Debug Windows
Tags: C# Debug Windows
How to get property name
Published: 27. October 2011 | Updated: 27. October 2011Categories: Reflection
Tags: C# Reflection
How to round numbers
Published: 27. October 2011 | Updated: 27. October 2011Categories: Math
Tags: C# Math
How to iterate through enum values
Published: 30. September 2011 | Updated: 27. October 2011Categories: Enums
Tags: C# Enums
How to find out whether form is active
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to hide windows form
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to update dictionary value
Published: 27. October 2011 | Updated: 27. October 2011Categories: Collections
Tags: Basics C# Collections
How to get information about all monitors
Published: 27. October 2011 | Updated: 27. October 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to get monitors count
Published: 27. October 2011 | Updated: 27. October 2011Categories: Hardware
Tags: C# Hardware Windows Winforms
How to list all open forms in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to get object properties using reflection
Published: 13. December 2008 | Updated: 27. October 2011Categories: Reflection
Tags: C# Reflection
How to launch custom process
Published: 13. December 2008 | Updated: 27. October 2011Categories: Processes
Tags: C# Windows Winforms
How to create partial class
Published: 9. October 2011 | Updated: 27. October 2011Categories: Basics
Tags: Basics C#
How to close a form in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to get operating system info
Published: 5. January 2009 | Updated: 27. October 2011Categories: Windows
Tags: C# Windows
How to validate datetime
Published: 27. October 2011 | Updated: 27. October 2011Categories: DateTime & TimeSpan
Tags: C# Text Validation
How to iterate dictionary
Published: 27. October 2011 | Updated: 27. October 2011Categories: Collections
Tags: Basics C# Collections
How to get key from dictionary by value
Published: 27. October 2011 | Updated: 27. October 2011Categories: Collections
Tags: C# Collections Linq
How to get value in dictionary by key
Published: 27. October 2011 | Updated: 27. October 2011Categories: Collections
Tags: Basics C# Collections
How to get values from dictionary
Published: 27. October 2011 | Updated: 27. October 2011Categories: Collections
Tags: Basics C# Collections
How to get keys from dictionary
Published: 9. October 2011 | Updated: 27. October 2011Categories: Linq
Tags: Basics C# Collections
How to minimize form in Winforms
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# UI Winforms
How to get handle of a window
Published: 27. October 2011 | Updated: 27. October 2011Categories: Winforms
Tags: C# Winforms
How to get current method name
Published: 27. October 2011 | Updated: 27. October 2011Categories: Debug Reflection
Tags: C# Debug Reflection
How to format a string
Published: 27. October 2011 | Updated: 27. October 2011Categories: Strings
Tags: C# Formatting Text
How to combine date and time
Published: 27. October 2011 | Updated: 27. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to implement generic IEnumerable<>
Published: 26. October 2011 | Updated: 26. October 2011Categories: Generics Implementations
Tags: C# Collections Design Patterns Generics
How to implement non-generic IEnumerable
Published: 26. October 2011 | Updated: 26. October 2011Categories: Implementations
Tags: C# Collections Design Patterns
How to format numbers
Published: 14. January 2009 | Updated: 26. October 2011Categories: Strings
Tags: C# Formatting Text
How to get substring from text
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to convert string to lowercase
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to convert string to uppercase
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to trim string
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to get string length
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to replace specified string in string
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to get the last index of character in string
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to efficiently concat multiple strings
Published: 26. September 2011 | Updated: 26. October 2011Categories: Strings
Tags: C# Performance Text
How to get the first index of character in string
Published: 14. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: Basics C# Text
How to escape string
Published: 24. October 2011 | Updated: 26. October 2011Categories: Strings
Tags: C# Text
How to create null-able value type
Published: 26. September 2011 | Updated: 26. October 2011Categories: Types
Tags: C#
How to use dynamic type
Published: 14. October 2011 | Updated: 26. October 2011Categories: Types
Tags: C#
How to find out whether type is value or reference type
Published: 20. October 2011 | Updated: 26. October 2011Categories: Types
Tags: Basics C#
How to get default value for type
Published: 21. December 2008 | Updated: 26. October 2011Categories: Types
Tags: Basics C#
How to enumerate properties of anonymous type
Published: 21. December 2008 | Updated: 26. October 2011Categories: Reflection Types
Tags: C# Reflection
How to get enum numeric value
Published: 9. October 2011 | Updated: 26. October 2011Categories: Enums
Tags: C# Enums
How to save xml document
Published: 14. January 2009 | Updated: 26. October 2011Categories: XML
Tags: C# XML
How to load xml to DataSet
Published: 15. January 2009 | Updated: 26. October 2011Categories: XML
Tags: C# Webforms Winforms XML
How to load xml document
Published: 14. January 2009 | Updated: 26. October 2011Categories: Streams XML
Tags: C# XML
How to dynamically load assembly from GAC
Published: 22. December 2008 | Updated: 26. October 2011Categories: Reflection
Tags: C# Reflection
How to split string to array
Published: 13. December 2008 | Updated: 26. October 2011Categories: Arrays
Tags: Array C#
How to reverse array
Published: 30. September 2011 | Updated: 26. October 2011Categories: Arrays
Tags: Array C#
How to get length of an array
Published: 14. October 2011 | Updated: 26. October 2011Categories: Arrays
Tags: Array C#
How to sort array ascending
Published: 20. October 2011 | Updated: 26. October 2011Categories: Arrays
Tags: Array C#
How to sort array descending
Published: 20. October 2011 | Updated: 26. October 2011Categories: Arrays
Tags: Array C#
How to get actual year
Published: 9. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to get yesterday's date
Published: 9. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to get days in month
Published: 9. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to get last day of month
Published: 9. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to get information about local time zone
Published: 12. October 2011 | Updated: 26. October 2011Categories: Calendar DateTime & TimeSpan
Tags: C# DateTime
How to get system time zones
Published: 12. October 2011 | Updated: 26. October 2011Categories: Calendar DateTime & TimeSpan
Tags: C# DateTime
How to find out whether year is leap year
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime
How to add TimeSpan to DateTime
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime Math
How to subtract TimeSpan from DateTime
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime Math
How to sum two TimeSpans
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime Math
How to subtract TimeSpan from TimeSpan
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime Math
How to negate TimeSpan value
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime & TimeSpan
Tags: C# DateTime Math
How to convert time between two time zones
Published: 12. October 2011 | Updated: 26. October 2011Categories: DateTime DateTime & TimeSpan
Tags: C# Conversion DateTime
How to get command line arguments as array
Published: 9. October 2011 | Updated: 26. October 2011Categories: Consoles
Tags: C# Console
How to replace text using regular expressions
Published: 24. October 2011 | Updated: 26. October 2011Categories: Regex
Tags: C# Regex Text
How to search text using regular expressions
Published: 24. October 2011 | Updated: 26. October 2011Categories: Regex
Tags: C# Regex Text
How to search text with named groups using regular expressions
Published: 24. October 2011 | Updated: 26. October 2011Categories: Regex
Tags: C# Regex Text
How to search multiple texts with named groups using regular expressions
Published: 24. October 2011 | Updated: 26. October 2011Categories: Regex
Tags: C# Regex Text
How to split text using regular expresions
Published: 24. October 2011 | Updated: 26. October 2011Categories: Regex
Tags: C# Regex Text
How to sleep/suspend thread
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to exchange objects as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to adds two integers as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to increment integer as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to decrement integer as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to read 64-bit value as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to exchange values with comparision as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011Categories: Threading
Tags: C# Threading
How to manually create and fill DataTable
Published: 14. December 2008 | Updated: 26. October 2011Categories: Databases Winforms
Tags: C# SQL Webforms Winforms WPF
How to write a windows registry key
Published: 13. December 2008 | Updated: 26. October 2011Categories: Registry
Tags: C# Windows
How to read a windows registry key
Published: 13. December 2008 | Updated: 26. October 2011Categories: Registry
Tags: C# Windows Winforms
How to delete a windows registry key
Published: 12. January 2009 | Updated: 26. October 2011Categories: Registry
Tags: C# Windows
How to get current Windows user
Published: 13. December 2008 | Updated: 26. October 2011Categories: Authorization
Tags: C# Security Windows Winforms
How to find out whether current user is in specific role
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to find out whether current user is administrator
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to find out whether windows user is authenticated
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to find out whether current user is anonymous
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to find out whether current user is guest
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to find out whether current user is system
Published: 14. October 2011 | Updated: 26. October 2011Categories: Authorization
Tags: Authorization C# Windows
How to enumerate serial ports
Published: 8. January 2009 | Updated: 26. October 2011Categories: Hardware Network
Tags: C# Hardware Network Windows
How to get disk free space
Published: 12. January 2009 | Updated: 26. October 2011Categories: File system Hardware
Tags: C# File System Hardware Windows
How to get processors count
Published: 9. October 2011 | Updated: 26. October 2011Categories: Hardware
Tags: C# Hardware Windows
How to get screen size
Published: 12. January 2009 | Updated: 26. October 2011Categories: GDI Hardware
Tags: C# GDI Hardware Windows Winforms
How to get mac address
Published: 9. October 2011 | Updated: 26. October 2011Categories: Hardware Network
Tags: C# Hardware Network Windows
How to list process threads
Published: 9. October 2011 | Updated: 26. October 2011Categories: Processes
Tags: C# Threading Windows
How to open url address in browser
Published: 13. December 2008 | Updated: 26. October 2011Categories: Network Processes
Tags: C# Network Windows Winforms
How to open pdf using Acrobat Reader
Published: 9. October 2011 | Updated: 26. October 2011Categories: Processes
Tags: C# Windows
How to get process ID
Published: 14. October 2011 | Updated: 26. October 2011Categories: Processes
Tags: C# Windows
How to list all running processes
Published: 9. October 2011 | Updated: 26. October 2011Categories: Processes
Tags: C# Windows
How to get current process
Published: 13. December 2008 | Updated: 26. October 2011Categories: Processes
Tags: C# Windows Winforms
How to create text file
Published: 22. December 2008 | Updated: 26. October 2011Categories: Files Streams
Tags: C# File System
How to decompress file using C#
Published: 18. December 2008 | Updated: 26. October 2011Categories: Files Streams
Tags: C# File System
How to compress file using C#
Published: 18. December 2008 | Updated: 26. October 2011Categories: Files Streams
Tags: C# File System
How to create breakpoint programmically
Published: 13. December 2008 | Updated: 26. October 2011Categories: Debug
Tags: C# Debug Visual Studio
How to find out that Visual Studio is attached
Published: 30. September 2011 | Updated: 26. October 2011Categories: Debug
Tags: C# Debug Visual Studio
How to convert hexadecimal number to integer
Published: 19. October 2011 | Updated: 26. October 2011Categories: Numbers
Tags: C# Conversion Formatting Math
How to convert string to double
Published: 13. December 2008 | Updated: 26. October 2011Categories: Numbers
Tags: C# Conversion
How to convert string to integer
Published: 13. December 2008 | Updated: 26. October 2011Categories: Numbers
Tags: C# Conversion
How to convert a byte array to an integer
Published: 13. December 2008 | Updated: 26. October 2011Categories: Numbers
Tags: C# Conversion
How to convert integer to hexadecimal number
Published: 19. October 2011 | Updated: 26. October 2011Categories: Numbers
Tags: C# Conversion Formatting Math
How to convert DateTime to binary
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime Serialization
How to parse DateTime in exact/specific format
Published: 20. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime Text
How to get DateTime from binary
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime Serialization
How to convert DateTime to OLE Automation
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime Serialization
How to get DateTime from OLE Automation
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime Serialization
How to get DateTime from Windows file time
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows
How to convert DateTime to Windows file time
Published: 24. October 2011 | Updated: 26. October 2011Categories: DateTime
Tags: C# Conversion DateTime File System Serialization Windows
How to convert Color to hex code
Published: 21. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from hex code
Published: 21. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from ARGB
Published: 24. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from name
Published: 24. October 2011 | Updated: 26. October 2011Categories: Colors
Tags: C# Colors Conversion Winforms WPF
How to get color from ScRGB
Published: 24. October 2011 | Updated: 26. October 2011Categories: Colors WPF
Tags: C# Colors Conversion WPF
How to check that struct is empty
Published: 26. October 2011 | Updated: 26. October 2011Categories: Basics
Tags: Basics C#
How to get/set file creation, last access or write date-time
Published: 25. October 2011 | Updated: 26. October 2011Categories: Files
Tags: C# DateTime Windows
How to get/set directory creation, last access or write date-time
Published: 26. October 2011 | Updated: 26. October 2011Categories: Directories
Tags: C# Windows
How to get content of directory
Published: 13. December 2008 | Updated: 26. October 2011Categories: Directories File system
Tags: C# Windows
How to check that file exists
Published: 13. December 2008 | Updated: 26. October 2011Categories: Files
Tags: C# Windows
How to check that directory exists
Published: 26. October 2011 | Updated: 26. October 2011Categories: Directories
Tags: C# Windows
How to set file attributes
Published: 25. October 2011 | Updated: 25. October 2011Categories: Files
Tags: C# Windows
How to set file to hidden
Published: 25. October 2011 | Updated: 25. October 2011Categories: Files
Tags: C# Windows
How to get file attributes
Published: 25. October 2011 | Updated: 25. October 2011Categories: Files
Tags: C# Windows
How to set file to ReadOnly state
Published: 9. October 2011 | Updated: 25. October 2011Categories: File system Windows
Tags: C# File System Windows
How to get invalid path/filename characters
Published: 25. October 2011 | Updated: 25. October 2011Categories: File system
Tags: C# Text
How to change file extension
Published: 25. October 2011 | Updated: 25. October 2011Categories: Files
Tags: C# Text
How to generate random file name
Published: 25. October 2011 | Updated: 25. October 2011Categories: File system
Tags: C# Windows
How to parse path
Published: 25. October 2011 | Updated: 25. October 2011Categories: File system
Tags: C# Text
How to get thread id
Published: 25. October 2011 | Updated: 25. October 2011Categories: Win32
Tags: C# Threading Win32 Windows
How to override Equals method
Published: 24. October 2011 | Updated: 24. October 2011Categories: Implementations
Tags: C# Design Patterns
How to override GetHashCode method
Published: 24. October 2011 | Updated: 24. October 2011Categories: Implementations
Tags: C# Design Patterns
How to get system colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: Windows
Tags: C# Colors Windows Winforms WPF
How to get predefined colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: Framework
Tags: C# Colors Winforms WPF
How to multiply color channels by specified value
Published: 24. October 2011 | Updated: 24. October 2011Categories: WPF
Tags: C# Colors WPF
How to add two colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: WPF
Tags: C# Colors WPF
How to subtract two colors
Published: 24. October 2011 | Updated: 24. October 2011Categories: WPF
Tags: C# Colors WPF
How to get color input from user using ColorDialog
Published: 14. December 2008 | Updated: 21. October 2011Categories: GDI Winforms
Tags: C# Colors Winforms
How to change background color in console application
Published: 9. October 2011 | Updated: 21. October 2011Categories: Consoles
Tags: C# Colors Console
How to change font color in console application
Published: 9. October 2011 | Updated: 21. October 2011Categories: Consoles
Tags: C# Colors Console
How to override method
Published: 20. October 2011 | Updated: 20. October 2011Categories: Basics
Tags: Basics C#
How to call base method in overridden method
Published: 20. October 2011 | Updated: 20. October 2011Categories: Basics
Tags: Basics C#
How to overload constructor
Published: 20. October 2011 | Updated: 20. October 2011Categories: Basics
Tags: Basics C#
How to escape/unescape string for url
Published: 19. October 2011 | Updated: 19. October 2011Categories: Network
Tags: C# Text
How to convert character to hexadecimal equivalent
Published: 19. October 2011 | Updated: 19. October 2011Categories: Converting
Tags: C# Conversion Text
How to format number as scientific/exponential
Published: 19. October 2011 | Updated: 19. October 2011Categories: Math
Tags: C# Formatting Math Text
How to format number as currency
Published: 19. October 2011 | Updated: 19. October 2011Categories: Currencies
Tags: C# Formatting Globalization
How to validate Guid
Published: 14. October 2011 | Updated: 14. October 2011Categories: Framework
Tags: C# Validation
How to get sign for number
Published: 14. October 2011 | Updated: 14. October 2011Categories: Math
Tags: C# Math
How to disable mouse in Winforms
Published: 14. October 2011 | Updated: 14. October 2011Categories: Winforms
Tags: C# Winforms
How to format number with leading zeros
Published: 14. October 2011 | Updated: 14. October 2011Categories: Framework
Tags: C# Formatting Text
How to get class name
Published: 14. October 2011 | Updated: 14. October 2011Categories: Reflection
Tags: C# Debug Reflection
How to use yield return keyword
Published: 14. October 2011 | Updated: 14. October 2011Categories: Collections
Tags: C# Collections
How to change colors in console application
Published: 8. January 2009 | Updated: 13. October 2011Categories: Windows
Tags: C# Windows
How to hide form from taskbar and Alt+TAB
Published: 22. January 2009 | Updated: 12. October 2011Categories: Winforms
Tags: C# Windows Winforms
How to get localized day name
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get week number
Published: 9. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# DateTime Globalization
How to get the first day of week for culture
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get localized month name from integer
Published: 9. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# DateTime Globalization
How to get date and time patterns for culture
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get sortable date-time pattern
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get RFC 1123 date-time pattern
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get AM and PM designators
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get date and time separators
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get abbreviated month names
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get abbreviated day names
Published: 12. October 2011 | Updated: 12. October 2011Categories: Calendar
Tags: C# Globalization
How to get all cultures info
Published: 11. October 2011 | Updated: 11. October 2011Categories: Globalization
Tags: C# Globalization
How to get number format information for culture
Published: 11. October 2011 | Updated: 11. October 2011Categories: Globalization
Tags: C# Globalization
How to get Windows country/region name
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization Windows
How to get ISO name for country/region
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization
How to find out whether country/region uses the metric system for measurements
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization
How to get Geo ID for country/region
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization
How to get country/region English name
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization
How to get country/region native name
Published: 11. October 2011 | Updated: 11. October 2011Categories: Regions
Tags: C# Globalization
How to get currency native name
Published: 11. October 2011 | Updated: 11. October 2011Categories: Currencies
Tags: C# Globalization
How to get currency English name
Published: 11. October 2011 | Updated: 11. October 2011Categories: Currencies
Tags: C# Globalization
How to get currency ISO symbol
Published: 11. October 2011 | Updated: 11. October 2011Categories: Currencies
Tags: C# Globalization
How to get currency symbol/sign
Published: 11. October 2011 | Updated: 11. October 2011Categories: Currencies
Tags: C# Globalization
How to change text to TitleCase
Published: 11. October 2011 | Updated: 11. October 2011Categories: Text
Tags: C# Globalization
How to get culture identifier (LCID)
Published: 11. October 2011 | Updated: 11. October 2011Categories: Globalization
Tags: C# Globalization
How to get EBCDIC code page for culture
Published: 11. October 2011 | Updated: 11. October 2011Categories: Text
Tags: C# Globalization
How to get OEM code page for culture
Published: 11. October 2011 | Updated: 11. October 2011Categories: Text
Tags: C# Globalization
How to get list separator for culture
Published: 11. October 2011 | Updated: 11. October 2011Categories: Text
Tags: C# Globalization
How to get Windows (ANSI) code page for culture
Published: 11. October 2011 | Updated: 11. October 2011Categories: Text
Tags: C# Globalization
How to get / set current culture
Published: 27. January 2009 | Updated: 11. October 2011Categories: Globalization
Tags: C# Globalization Threading
How to get localized day and month names
Published: 14. January 2009 | Updated: 11. October 2011Categories: Calendar
Tags: C# Globalization
How to get value from AppSettings in App.config or Web.config
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C# Console Winforms WPF
How to get connection string from App.config or Web.config
Published: 9. October 2011 | Updated: 9. October 2011Categories: Databases Framework
Tags: C# SQL Winforms WPF
How to get name of application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Console Reflection Winforms WPF
How to create guid from string
Published: 9. October 2011 | Updated: 9. October 2011Categories: Converting Framework
Tags: C#
How to get average number from collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Linq Math
Tags: C# Linq Math
How to get minimum number from collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Linq Math
Tags: C# Linq Math
How to get maximum number from collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Linq Math
Tags: C# Linq Math
How to sum numbers from collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Linq Math
Tags: C# Collections Linq Math
How to get PI number
Published: 9. October 2011 | Updated: 9. October 2011Categories: Math
Tags: C# Math
How to get build number
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Console Reflection Winforms WPF
How to get working directory / location
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles Directories Winforms
Tags: C# Console Winforms WPF
How to get directory of a file
Published: 9. October 2011 | Updated: 9. October 2011Categories: Directories
Tags: C# File System
How to exit application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles Winforms
Tags: C# Console Winforms
How to get desktop path
Published: 9. October 2011 | Updated: 9. October 2011Categories: Windows
Tags: C# Windows
How to get command line for process
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C# Console Winforms
How to get network domain name
Published: 9. October 2011 | Updated: 9. October 2011Categories: Network
Tags: C# Network Windows
How to get .NET version
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C# Windows
How to get host name and ip addresses
Published: 9. October 2011 | Updated: 9. October 2011Categories: Network
Tags: C# Network
How to get name of the computer
Published: 9. October 2011 | Updated: 9. October 2011Categories: Windows
Tags: C# Windows
How to get assembly version
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Reflection
How to get object type
Published: 9. October 2011 | Updated: 9. October 2011Categories: Reflection
Tags: C# Reflection
How to join two lists
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to use Stack collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to use Queue collection
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to use SortedDictionary
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to use generic SortedList
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to get random bytes
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C#
How to get random number
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C#
How to convert byte array to string
Published: 9. October 2011 | Updated: 9. October 2011Categories: Converting
Tags: C#
How to convert string to byte array
Published: 9. October 2011 | Updated: 9. October 2011Categories: Converting
Tags: C#
How to break out of loop
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to use IEnumerator
Published: 9. October 2011 | Updated: 9. October 2011Categories: Collections
Tags: C# Collections
How to encapsulate field
Published: 9. October 2011 | Updated: 9. October 2011Categories: Basics
Tags: C#
How to encapsulate event
Published: 9. October 2011 | Updated: 9. October 2011Categories: Events
Tags: C# Delegates
How to get input text in console application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles
Tags: C# Console Text
How to clear window in console application
Published: 9. October 2011 | Updated: 9. October 2011Categories: Consoles
Tags: C# Console
How to implement INotifyPropertyChanged
Published: 9. October 2011 | Updated: 9. October 2011Categories: Implementations
Tags: C# Design Patterns
How to rethrow exception
Published: 9. October 2011 | Updated: 9. October 2011Categories: Framework
Tags: C#
How to get focused control
Published: 27. January 2009 | Updated: 9. October 2011Categories: Win32 Winforms
Tags: C# Controls Win32 Winforms
How to copy stream to stream
Published: 13. December 2008 | Updated: 9. October 2011Categories: Streams
Tags: C#
How to trace to output
Published: 13. December 2008 | Updated: 9. October 2011Categories: Debug
Tags: C# Debug Visual Studio
How to get member's custom attributes
Published: 18. December 2008 | Updated: 9. October 2011Categories: Attributes Reflection
Tags: Attributes C# Reflection
How to mark type or member as obsolete (deprecated)
Published: 27. January 2009 | Updated: 9. October 2011Categories: Attributes
Tags: Attributes C# Visual Studio
How to convert SecureString to string
Published: 30. September 2011 | Updated: 30. September 2011Categories: Converting Security
Tags: C# Security Text Windows
How to sort collection
Published: 30. September 2011 | Updated: 30. September 2011Categories: Collections
Tags: C# Collections
How to reverse collection
Published: 30. September 2011 | Updated: 30. September 2011Categories: Collections
Tags: C# Collections
How to create extension method
Published: 26. September 2011 | Updated: 26. September 2011Categories: Framework
Tags: C#
How to truncate file path
Published: 27. January 2009 | Updated: 26. September 2011Categories: File system Win32
Tags: C# File System Win32 Windows
How to detect save mode in Windows
Published: 26. January 2009 | Updated: 26. September 2011Categories: Windows
Tags: C# Windows Winforms
How to convert handle to form
Published: 15. January 2009 | Updated: 26. September 2011Categories: Unsafe Code Winforms
Tags: C# Controls Windows Winforms
How to clear recent documents
Published: 27. January 2009 | Updated: 26. September 2011Categories: File system Win32
Tags: C# Win32 Windows
How to add file to recent documents
Published: 27. January 2009 | Updated: 26. September 2011Categories: Files Win32
Tags: C# Win32 Windows
How to get status of windows service
Published: 26. January 2009 | Updated: 26. September 2011Categories: Services
Tags: C# Services Windows
How to render high quality antialiased text
Published: 27. January 2009 | Updated: 26. September 2011Categories: GDI
Tags: C# GDI Text Winforms
How to check validity of IP address
Published: 22. January 2009 | Updated: 22. January 2009Categories: Network
Tags: C# Network
How to show/hide mouse cursor
Published: 22. January 2009 | Updated: 22. January 2009Categories: Winforms
Tags: C# Windows Winforms
How to get file name from path
Published: 22. January 2009 | Updated: 22. January 2009Categories: Files
Tags: C# File System Windows
How to send email using default mail client
Published: 22. January 2009 | Updated: 22. January 2009Categories: Network
Tags: C# Network Windows Winforms
How to enumerate network interfaces
Published: 22. January 2009 | Updated: 22. January 2009Categories: Network
Tags: C# Network Windows
How to choose font using FontDialog
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to show help file
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to show online help
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to show help pop-up window
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Controls Winforms
How to save / load RTF document using RichTextBox
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Text Winforms
How to keep a form always on top
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to get active MDI child
Published: 21. January 2009 | Updated: 21. January 2009Categories: Winforms
Tags: C# Winforms
How to create thumbnail image
Published: 21. January 2009 | Updated: 21. January 2009Categories: GDI
Tags: C# GDI
How to draw image from file
Published: 21. January 2009 | Updated: 21. January 2009Categories: GDI
Tags: C# GDI Winforms
How to choose folder using FolderBrowserDialog
Published: 21. January 2009 | Updated: 21. January 2009Categories: Directories Winforms
Tags: C# Windows Winforms
How to draw centered text
Published: 21. January 2009 | Updated: 21. January 2009Categories: GDI
Tags: C# GDI Text Winforms
How to get image encoder/decoder by image format
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to get installed image decoders
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to get installed image encoders
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# GDI Winforms
How to render buffered graphics
Published: 20. January 2009 | Updated: 20. January 2009Categories: GDI
Tags: C# Controls GDI Winforms
How to get installed fonts
Published: 20. January 2009 | Updated: 20. January 2009Categories: Windows
Tags: C# Text Windows
How to iterate through text using fixed statement
Published: 16. January 2009 | Updated: 18. January 2009Categories: Unsafe Code
Tags: C# Performance Unsafe
How to access members of pointer to structure
Published: 15. January 2009 | Updated: 15. January 2009Categories: Unsafe Code
Tags: C# Unsafe
How to change value through pointer
Published: 15. January 2009 | Updated: 15. January 2009Categories: Unsafe Code
Tags: C# Unsafe
How to get pointer to value
Published: 15. January 2009 | Updated: 15. January 2009Categories: Unsafe Code
Tags: C# Unsafe
How to get value from pointer
Published: 15. January 2009 | Updated: 15. January 2009Categories: Unsafe Code
Tags: C# Unsafe
How to prevent a member to be visible in debug window
Published: 15. January 2009 | Updated: 15. January 2009Categories: Attributes Debug
Tags: Attributes C# Debug Visual Studio
How to strip html tags
Published: 15. January 2009 | Updated: 15. January 2009Categories: Network
Tags: C# Network Webforms
How to get calling method
Published: 14. January 2009 | Updated: 14. January 2009Categories: Debug Reflection
Tags: C# Debug Reflection
How to continue a windows service
Published: 12. January 2009 | Updated: 12. January 2009Categories: Services
Tags: C# Services Windows
How to pause a windows service
Published: 12. January 2009 | Updated: 12. January 2009Categories: Services
Tags: C# Services Windows
How to stop a windows service
Published: 12. January 2009 | Updated: 12. January 2009Categories: Services
Tags: C# Services Windows
How to start a windows service
Published: 12. January 2009 | Updated: 12. January 2009Categories: Services
Tags: C# Services Windows
How to get list of services
Published: 12. January 2009 | Updated: 12. January 2009Categories: Services
Tags: C# Services Windows
How to get system information
Published: 12. January 2009 | Updated: 12. January 2009Categories: Windows
Tags: C# Windows
How to get system directory
Published: 12. January 2009 | Updated: 12. January 2009Categories: Windows
Tags: C# File System Windows
How to set environment variable
Published: 12. January 2009 | Updated: 12. January 2009Categories: Windows
Tags: C# Windows
How to generate cryptographically random data
Published: 8. January 2009 | Updated: 8. January 2009Categories: Security
Tags: C# Security
How to get path to windows special folders
Published: 8. January 2009 | Updated: 8. January 2009Categories: Windows
Tags: C# File System Windows
How to get file size
Published: 8. January 2009 | Updated: 8. January 2009Categories: Files
Tags: C# File System Windows
How to copy directory
Published: 8. January 2009 | Updated: 8. January 2009Categories: Directories
Tags: C# File System Windows
How to ping IP
Published: 8. January 2009 | Updated: 8. January 2009Categories: Network
Tags: C# Network
How to determine network connection availability
Published: 8. January 2009 | Updated: 8. January 2009Categories: Network
Tags: C# Network Windows
How to create comparer for collection sorting
Published: 8. January 2009 | Updated: 8. January 2009Categories: Collections Implementations
Tags: C# Collections Design Patterns
How to send keys to application
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Windows Winforms
How to get output from console application
Published: 8. January 2009 | Updated: 8. January 2009Categories: Consoles
Tags: C# Windows Console
How to stop playing background sound
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Media Windows Winforms
How to play sound in C#
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Media Windows Winforms
How to get image from clipboard
Published: 8. January 2009 | Updated: 8. January 2009Categories: GDI Windows
Tags: C# GDI Windows Winforms
How to get currently active form for application
Published: 8. January 2009 | Updated: 8. January 2009Categories: Winforms
Tags: C# Controls UI Winforms
How to create temporary file
Published: 5. January 2009 | Updated: 5. January 2009Categories: Files
Tags: C# File System Windows
How to protect data using user or machine credentials
Published: 5. January 2009 | Updated: 5. January 2009Categories: Encryption Windows
Tags: C# Security Text Windows
How to get environment variables
Published: 5. January 2009 | Updated: 5. January 2009Categories: Framework Windows
Tags: C# Windows
How to parse connection string
Published: 22. December 2008 | Updated: 22. December 2008Categories: Databases
Tags: C# SQL Text
How to use namespace shortcuts
Published: 22. December 2008 | Updated: 22. December 2008Categories: Framework
Tags: C# Visual Studio
How to write bytes to file
Published: 22. December 2008 | Updated: 22. December 2008Categories: Files
Tags: C# File System Windows
How to start thread with parameter
Published: 21. December 2008 | Updated: 21. December 2008Categories: Threading
Tags: C# Threading
How to use goto statement
Published: 21. December 2008 | Updated: 21. December 2008Categories: Framework
Tags: C# Visual Studio
How to move file
Published: 21. December 2008 | Updated: 21. December 2008Categories: Files
Tags: C# File System Windows
How to copy file
Published: 21. December 2008 | Updated: 21. December 2008Categories: Files
Tags: C# File System Windows
How to flash form taskbar button
Published: 21. December 2008 | Updated: 21. December 2008Categories: Win32 Winforms
Tags: C# UI Win32 Windows Winforms
How to delete files or folder to Recycle Bin
Published: 14. December 2008 | Updated: 21. December 2008Categories: Windows File system
Tags: C# File System Windows
How to delete file
Published: 21. December 2008 | Updated: 21. December 2008Categories: Files
Tags: C# File System Windows
How to use console output in winforms
Published: 15. December 2008 | Updated: 20. December 2008Categories: Win32 Winforms
Tags: C# Console Win32 Windows Winforms
How to create screenshot using C#
Published: 13. December 2008 | Updated: 20. December 2008Categories: GDI Windows
Tags: C# GDI Windows
How to access control from different thread
Published: 15. December 2008 | Updated: 20. December 2008Categories: Threading Winforms
Tags: C# Controls Threading Winforms
How to create MDI form
Published: 18. December 2008 | Updated: 18. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to set tooltip for control
Published: 18. December 2008 | Updated: 18. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to encrypt / decrypt file for current Windows user
Published: 16. December 2008 | Updated: 16. December 2008Categories: Encryption Files
Tags: C# File System Security Windows
How to read file as bytes
Published: 16. December 2008 | Updated: 16. December 2008Categories: Files
Tags: C# File System Windows
How to get file extension
Published: 15. December 2008 | Updated: 15. December 2008Categories: Files
Tags: C# File System Text Windows
How to create control and add to form on the fly
Published: 15. December 2008 | Updated: 15. December 2008Categories: Winforms
Tags: C# Controls UI Winforms
How to disable close 'x' button in winform
Published: 15. December 2008 | Updated: 15. December 2008Categories: Win32 Winforms
Tags: C# UI Windows Winforms
How to read text from file
Published: 15. December 2008 | Updated: 15. December 2008Categories: Files
Tags: C# File System Text
How to create MD5 from string
Published: 14. December 2008 | Updated: 14. December 2008Categories: Security
Tags: C# Security Text
How to create file open dialog
Published: 14. December 2008 | Updated: 14. December 2008Categories: Winforms
Tags: C# File System UI Winforms
How to create file save dialog
Published: 14. December 2008 | Updated: 14. December 2008Categories: Winforms
Tags: C# File System UI Winforms
How to read values from database
Published: 14. December 2008 | Updated: 14. December 2008Categories: Databases
Tags: C# SQL
How to connect to database
Published: 14. December 2008 | Updated: 14. December 2008Categories: Databases
Tags: C# SQL
How to execute stored procedure with parameters
Published: 14. December 2008 | Updated: 14. December 2008Categories: Databases
Tags: C# SQL
How to play Windows sounds
Published: 14. December 2008 | Updated: 14. December 2008Categories: Windows
Tags: C# Media
How to get object's methods using reflection
Published: 13. December 2008 | Updated: 13. December 2008Categories: Reflection
Tags: C# Reflection
How to create instance of object using reflection
Published: 13. December 2008 | Updated: 13. December 2008Categories: Reflection
Tags: C# Reflection
How to get current directory
Published: 13. December 2008 | Updated: 13. December 2008Categories: Reflection
Tags: C# Reflection
How to get generic arguments of generic class
Published: 13. December 2008 | Updated: 13. December 2008Categories: Generics
Tags: C# Generics Reflection
How to download text file
Published: 13. December 2008 | Updated: 13. December 2008Categories: Network
Tags: C# Network Webforms
How to get host name of IP address
Published: 13. December 2008 | Updated: 13. December 2008Categories: Network
Tags: C# Network Webforms
How to send mail using C#
Published: 13. December 2008 | Updated: 13. December 2008Categories: Network
Tags: C# Network
How to create directory
Published: 13. December 2008 | Updated: 13. December 2008Categories: Directories
Tags: C# File System
How to delete directory
Published: 13. December 2008 | Updated: 13. December 2008Categories: Directories
Tags: C# File System
How to move directory
Published: 13. December 2008 | Updated: 13. December 2008Categories: Directories
Tags: C# File System
How to get drives
Published: 13. December 2008 | Updated: 13. December 2008Categories: File system Hardware
Tags: C# File System Hardware Windows
How to iterate List efficiently
Published: 13. December 2008 | Updated: 13. December 2008Categories: Collections
Tags: C# Collections Delegates





