ICSharpCode.AvalonEdit.Editing.Selection.StartSelectionOrSetEndpoint C# (CSharp) Method

StartSelectionOrSetEndpoint() public method

If this selection is empty, starts a new selection from startOffset to newEndOffset, otherwise, changes the endpoint of this selection.
public StartSelectionOrSetEndpoint ( int startOffset, int newEndOffset ) : Selection
startOffset int
newEndOffset int
return Selection
        public virtual Selection StartSelectionOrSetEndpoint(int startOffset, int newEndOffset)
        {
            if (IsEmpty)
                return new SimpleSelection(startOffset, newEndOffset);
            else
                return SetEndpoint(newEndOffset);
        }