# Using Indexes Programmatically

## Content



Indexes are used by LiveLinq to optimize query execution, but they are also accessible for programmatic use. You can use indexes directly in code, calling methods of the **Index\<T>** class to perform a variety of fast searches. This makes LiveLinq indexes useful even outside the framework of LINQ, outside queries.

For example, searching for a particular value can look like this:

```auto
indexByCity.Find("London")
```

or even like this:

```auto
indexByCity.FindStartingWith("L")
```

The **Index\<T>** class also has other methods for performing fast searches and fast joins and groupings that can be useful in any code, not just in queries: [FindGreater](/componentone/api/win/online-datasource/dotnet-framework-api/C1.LiveLinq.4.8/C1.LiveLinq.Indexing.Index-1.FindGreater.html), [FindBetween](/componentone/api/win/online-datasource/dotnet-framework-api/C1.LiveLinq.4.8/C1.LiveLinq.Indexing.Index-1.FindBetween.html), **Join**, **GroupJoin**, and a few others.

Examples of programmatic searches (without LINQ) can be found in the LiveLinq indexing demo, see [Query Performance sample application (LiveLinqQueries)](/componentone/docs/win/online-datasource/ComponentOneLiveLinq/Sample/SampleApplications/QueryPerformanceSampleApplication). In fact, every query that is shown in that demo has an alternative implementation via direct programmatic search in code without LINQ.