DbFunctions.Left(String, Nullable<Int64>) DbFunctions.Left(String, Nullable<Int64>) DbFunctions.Left(String, Nullable<Int64>) Method

Definition

When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given number of the leftmost characters in a string.

[System.Data.Entity.DbFunction("Edm", "Left")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="stringArgument")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId="string")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="length")]
public static string Left (string stringArgument, Nullable<long> length);
static member Left : string * Nullable<int64> -> string
Public Shared Function Left (stringArgument As String, length As Nullable(Of Long)) As String

Parameters

stringArgument
String String String

The input string.

length
Nullable<Int64>

The number of characters to return

Returns

A string containing the number of characters asked for from the left of the input string.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to