Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Byte.ToString() Method in C#
The Byte.ToString() method in C# converts the value of the current Byte object to its equivalent string representation.
Syntax
Following is the syntax −
public override string ToString ();
Example
Let us now see an example to implement the Byte.ToString() method −
using System;
public class Demo {
public static void Main(){
byte val1, val2;
val1 = Byte.MinValue;
val2 = 15;
Console.WriteLine("Value1 (Byte) = "+val1.ToString());
Console.WriteLine("Value2 (Byte) = "+val2.ToString());
}
}
Output
This will produce the following output −
Value1 (Byte) = 0 Value2 (Byte) = 15
Advertisements
