Read characters from a string in C#

using System;
using System.IO;

public class CharsFromStr
{
    public static void Main()
    {
        string str = "Some number of characters";
        char[] b = new char[str.Length];

        using (StringReader sr = new StringReader(str))
        {
            // Read 13 characters from the string into the array.
            sr.Read(b, 0, 13);
            Console.WriteLine(b);

            // Read the rest of the string starting at the current string position.
            // Put in the array starting at the 6th array member.
            sr.Read(b, 5, str.Length - 13);
            Console.WriteLine(b);
        }
    }
}
// The example has the following output:
//
// Some number o
// Some f characters

References
https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-read-characters-from-a-string

Allow GUI root login on Ubuntu 22.04

sudo passwd
sudo nano /etc/gdm3/custom.conf

Inside the GDM configuration file, we need to add the AllowRoot=true line. After you have made this change, you can save and exit the file.

AllowRoot=true
sudo nano /etc/pam.d/gdm-password

Inside of the PAM authentication daemon file, comment out the following line, which denies root access to the graphical user interface, with a pound sign #. You can save your changes and exit this file when done.

auth   required        pam_succeed_if.so user != root quiet_success
reboot

References
https://linuxconfig.org/how-to-allow-gui-root-login-on-ubuntu-22-04-jammy-jellyfish-linux