Flood.GUI.Controls.TextBox.GetSelection C# (CSharp) Method

GetSelection() public method

Returns currently selected text.
public GetSelection ( ) : String
return String
        public String GetSelection()
        {
            if (!HasSelection) return String.Empty;

            int start = Math.Min(m_CursorPos, m_CursorEnd);
            int end = Math.Max(m_CursorPos, m_CursorEnd);

            String str = Text;
            return str.Substring(start, end - start);
        }