PianoKeyEmulator.Note.FromString C# (CSharp) Méthode

FromString() public static méthode

public static FromString ( string str ) : Note
str string
Résultat Note
        public static Note FromString(string str)
        {
            byte octave = byte.Parse(str.Last().ToString());
            var tone = str.Substring(0, str.Length - 1).Replace('#', 'd').ConvertToEnum<Tones>();

            return new Note(octave, tone);
        }