Search for object and returns the last index within Array offset in CSharp

Description

The following code shows how to search for object and returns the last index within Array offset.

Example


/*from   w w  w  . j  av a 2 s.c  om*/
using System;

public class Example
{
    public static void Main()
    {
        string[] myValues = { "2001",
            "1999",
            "2000",
            "1234",
            "2002",
            "2001",
            "3211" };


        Console.WriteLine(Array.LastIndexOf(myValues, "2001", 3));
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Data Types »




C# Data Types
Bool
Byte
Char
Decimal
Double
Float
Integer
Long
Short
String
C# Array
Array Example
Byte Array
C# Standard Data Type Format
BigInteger
Complex
Currency
DateTime
DateTimeOffset
DateTime Format Parse Convert
TimeSpan
TimeZone
Enum
Null
tuple
var