Abc.NCrafts.Quizz.Questions._021.Answer3.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            var stream = new MemoryStream(0x1000);
            var messageBytes = Encoding.ASCII.GetBytes(_text);

            // begin
            stream.Write(messageBytes, 0, messageBytes.Length);

            var bytes = stream.GetBuffer();
            for (var i = 0; i < stream.Length; i++)
            {
                bytes[i] = (byte)char.ToUpper(((char)bytes[i]));
            }
            // end

            var upperMessage 
                = Encoding.ASCII.GetString(bytes, 
                                           0, 
                                           (int)stream.Length);
            Logger.Log(upperMessage);
        }
    }
Answer3