About 38,600 results
Open links in new tab
  1. c# - Best way to cast/convert number to string - Stack Overflow

    May 5, 2014 · If you have a string which contains an int value, you parse (or tryparse) it. string myIntStr = "5"; int myInt = int.Parse(myIntStr); If you don't know if the boxed type is the assummed type you use is and as. object assumedMyType = new MyType(); MyType myType = assumedMyType as MyType;

    Missing:

    • Chart

    Must include:

  2. Convert.ToString Method (System) | Microsoft Learn

    Converts the value of the specified 32-bit signed integer to its equivalent string representation, using the specified culture-specific formatting information.

    Missing:

    • Chart

    Must include:

  3. c# - Convert int to string? - Stack Overflow

    Jun 21, 2010 · .ToString() is the most efficient way to do the conversion. All of the other methods presented here will eventually call .ToString() anyway. Just in case you want the binary representation and you're still drunk from last night's party: StringBuilder builder = new StringBuilder(sizeof(byte) * 8);

    Missing:

    • Chart

    Must include:

  4. casting - Int to Char in C# - Stack Overflow

    Feb 22, 2012 · Convert.ToChar eventually performs an explicit conversion as "(char)value", where "value" is your int value. Before doing so, it checks to ensure "value" is in the range 0 to 0xffff, and throws an OverflowException if it is not.

    Missing:

    • Chart

    Must include:

  5. How to Convert Int to String in C# - Code Maze

    Feb 20, 2022 · Using Int32.ToString Method to Convert Int to String. Let’s first create a console application, and define an int variable with a value of 3: var luckyNumber = 3; Next, let’s use this variable in our examples to convert int to string using the different methods and display it on the console window.

    Missing:

    • Chart

    Must include:

  6. C# int to string conversion - converting integers to strings in C#

    Jan 22, 2024 · C# int to String tutorial shows how to convert integers to strings. There are several ways to perform int to String conversion in C#. We can use string concatenation, string formatting, string building, and use built-in conversion methods.

    Missing:

    • Chart

    Must include:

  7. How to Convert Int to String in C# - Delft Stack

    Feb 2, 2024 · This C# int to string how-to article shows different methods to convert an integer to string in C#. It introduces methods like ToString method, Convert.ToString method, string formatting, and string concatenation method.

    Missing:

    • Chart

    Must include:

  8. Converting int to string in C# - A Complete Guide - Web Dev Tutor

    Jul 22, 2024 · The simplest and most straightforward way to convert an int to a string in C# is by using the ToString() method. This method is available on all integral types and allows you to convert the integer value to its string representation.

    Missing:

    • Chart

    Must include:

  9. C#/.NET - convert int to string - Dirask

    TypeConverter converter = TypeDescriptor.GetConverter(typeof(int)); int value = 123; string text = (string)converter.ConvertTo(value, typeof(string)); Console.WriteLine(text); // 123 Output: 123

    Missing:

    • Chart

    Must include:

  10. Converting Integer to String in C# - webdevtutor.net

    Jul 22, 2024 · The simplest way to convert an integer to a string in C# is by using the ToString method provided by the int data type. This method allows you to convert an integer to its string representation easily. Here's an example: int number = 42; string strNumber = number.ToString(); Console.WriteLine(strNumber); // Output: "42" Using String Interpolation

    Missing:

    • Chart

    Must include:

  11. Some results have been removed
Refresh