Math code snippets (20)

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 calculate Fibonacci numbers/sequence

Published: 15. February 2012 | Updated: 15. February 2012
Categories: Math
Tags: C# Math

How to create range of numbers

Published: 25. November 2011 | Updated: 25. November 2011
Categories: Collections Math
Tags: C# Collections Math

How to get distance between two points

Published: 13. December 2008 | Updated: 5. November 2011
Categories: GDI Math
Tags: C# GDI Math Winforms WPF

How to find out whether number is odd/even number

Published: 3. November 2011 | Updated: 3. November 2011
Categories: Math
Tags: C# Math

How to round numbers

Published: 27. October 2011 | Updated: 27. October 2011
Categories: Math
Tags: C# Math

How to add TimeSpan to DateTime

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime & TimeSpan
Tags: C# DateTime Math

How to subtract TimeSpan from DateTime

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime & TimeSpan
Tags: C# DateTime Math

How to sum two TimeSpans

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime & TimeSpan
Tags: C# DateTime Math

How to subtract TimeSpan from TimeSpan

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime & TimeSpan
Tags: C# DateTime Math

How to negate TimeSpan value

Published: 24. October 2011 | Updated: 26. October 2011
Categories: DateTime & TimeSpan
Tags: C# DateTime Math

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 integer to hexadecimal number

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

How to format number as scientific/exponential

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

How to get sign for number

Published: 14. October 2011 | Updated: 14. October 2011
Categories: Math
Tags: C# Math

How to get average number from collection

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Linq Math
Tags: C# Linq Math

How to get minimum number from collection

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Linq Math
Tags: C# Linq Math

How to get maximum number from collection

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Linq Math
Tags: C# Linq Math

How to sum numbers from collection

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Linq Math
Tags: C# Collections Linq Math

How to get PI number

Published: 9. October 2011 | Updated: 9. October 2011
Categories: Math
Tags: C# Math