NAnt SDK Documentation - v0.92

StringUtils.EndsWith Method 

NOTE: This method is now obsolete.

StringUtils.EndsWith method is depreciated. Use string.EndsWith(string) instead.


Determines whether the last character of the given String matches the specified character.

[Visual Basic]
<Obsolete(Message:="StringUtils.EndsWith method is depreciated. Use string.EndsWith(string) instead.", IsError:=False)>
Public Shared Function EndsWith( _
   ByVal value As String, _
   ByVal c As Char _
) As Boolean
[C#]
[Obsolete(Message="StringUtils.EndsWith method is depreciated. Use string.EndsWith(string) instead.", IsError=False)]
public static bool EndsWith(
   string value,
   char c
);

Parameters

value
The string.
c
The character.

Return Value

true if the last character of value matches c; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException value is a null reference (Nothing in Visual Basic).

See Also

StringUtils Class | NAnt.Core.Util Namespace