Answers for "c# make char"

C#
3

c# char

var chars = new[]
{
    'j',
    'u006A',
    'x006A',
    (char)106,
};
Console.WriteLine(string.Join(" ", chars));  // output: j j j j
Posted by: Guest on July-11-2020
0

how to write characters c#

using System;
using System.IO;
using System.Text;

public class CharsToStr
{
    public static void Main()
    {
        StringBuilder sb = new StringBuilder("Start with a string and add from ");
        char[] b = { 'c', 'h', 'a', 'r', '.', ' ', 'B', 'u', 't', ' ', 'n', 'o', 't', ' ', 'a', 'l', 'l' };

        using (StringWriter sw = new StringWriter(sb))
        {
            // Write five characters from the array into the StringBuilder.
            sw.Write(b, 0, 5);
            Console.WriteLine(sb);
        }
    }
}
// The example has the following output:
//
// Start with a string and add from char.
Posted by: Guest on June-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language