System.Globalization.CompareInfo.CompareInfo.LastIndexOf C# (CSharp) Method

LastIndexOf() public method

public LastIndexOf ( string source, string value, int startIndex, int count, CompareOptions options ) : int
source string
value string
startIndex int
count int
options CompareOptions
return int
		public virtual int LastIndexOf(string source, string value,
					       int startIndex, int count,
					       CompareOptions options)
		{
			if(source == null) {
				throw new ArgumentNullException("source");
			}
			if(value == null) {
				throw new ArgumentNullException("value");
			}
			if(startIndex < 0) {
				throw new ArgumentOutOfRangeException ("startIndex");
			}
			if(count < 0 || (startIndex - count) < -1) {
				throw new ArgumentOutOfRangeException("count");
			}
			if ((options & ValidCompareOptions_NoStringSort) != options)
				throw new ArgumentException ("options");
			if(count == 0) {
				return(-1);
			}

			int valuelen=value.Length;
			if(valuelen==0) {
				return(0);
			}

			return(internal_index_switch (source, startIndex, count,
					       value, options, false));
		}

Same methods

CompareInfo.CompareInfo::LastIndexOf ( string source, char value ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, char value, CompareOptions options ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, char value, int startIndex ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, char value, int startIndex, CompareOptions options ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, char value, int startIndex, int count ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, char value, int startIndex, int count, CompareOptions options ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, string value ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, string value, CompareOptions options ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, string value, int startIndex ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, string value, int startIndex, CompareOptions options ) : int
CompareInfo.CompareInfo::LastIndexOf ( string source, string value, int startIndex, int count ) : int