diff --git a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs index 6134230e6d..411579d8be 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs @@ -662,11 +662,11 @@ namespace ICSharpCode.NRefactory.CSharp /// Returns true, if the given coordinates are in the node. /// /// - /// True, if location is between StartLocation and EndLocation (inclusive); otherwise, false. + /// True, if location is between StartLocation and EndLocation (exclusive); otherwise, false. /// public bool Contains (TextLocation location) { - return this.StartLocation <= location && location <= this.EndLocation; + return this.StartLocation <= location && location < this.EndLocation; } public override void AddAnnotation (object annotation)