diff --git a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
index a5a0055e78..6134230e6d 100644
--- a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
+++ b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
@@ -154,22 +154,6 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- ///
- /// Returns true, if the given coordinates are in the node.
- ///
- public bool IsInside (TextLocation location)
- {
- return StartLocation <= location && location <= EndLocation;
- }
-
- ///
- /// Returns true, if the given coordinates (line, column) are in the node.
- ///
- public bool IsInside(int line, int column)
- {
- return IsInside(new TextLocation (line, column));
- }
-
///
/// Gets the region from StartLocation to EndLocation for this node.
/// The file name of the region is set based on the parent CompilationUnit's file name.
@@ -663,14 +647,26 @@ namespace ICSharpCode.NRefactory.CSharp
return w.ToString ();
}
+ ///
+ /// Returns true, if the given coordinates (line, column) are in the node.
+ ///
+ ///
+ /// True, if the given coordinates are between StartLocation and EndLocation (inclusive); otherwise, false.
+ ///
public bool Contains (int line, int column)
{
return Contains (new TextLocation (line, column));
}
-
+
+ ///
+ /// Returns true, if the given coordinates are in the node.
+ ///
+ ///
+ /// True, if location is between StartLocation and EndLocation (inclusive); 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)