Strings.Len Yöntem

Tanım

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Aşırı Yüklemeler

Len(UInt64)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(UInt32)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(UInt16)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(String)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Single)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(SByte)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Object)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Int64)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Int16)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Double)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Decimal)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(DateTime)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Char)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Byte)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Boolean)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(Int32)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Len(UInt64)

Önemli

Bu API, CLS uyumlu değildir.

CLS uyumlu alternatif
Microsoft.VisualBasic.Strings.Len(Int64)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::UInt64 Expression);
[System.CLSCompliant(false)]
public static int Len (ulong Expression);
public static int Len (ulong Expression);
[<System.CLSCompliant(false)>]
static member Len : uint64 -> int
static member Len : uint64 -> int
Public Function Len (Expression As ULong) As Integer

Parametreler

Expression
UInt64

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Öznitelikler

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(UInt32)

Önemli

Bu API, CLS uyumlu değildir.

CLS uyumlu alternatif
Microsoft.VisualBasic.Strings.Len(Int32)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::UInt32 Expression);
[System.CLSCompliant(false)]
public static int Len (uint Expression);
public static int Len (uint Expression);
[<System.CLSCompliant(false)>]
static member Len : uint32 -> int
static member Len : uint32 -> int
Public Function Len (Expression As UInteger) As Integer

Parametreler

Expression
UInt32

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Öznitelikler

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(UInt16)

Önemli

Bu API, CLS uyumlu değildir.

CLS uyumlu alternatif
Microsoft.VisualBasic.Strings.Len(Int16)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::UInt16 Expression);
[System.CLSCompliant(false)]
public static int Len (ushort Expression);
public static int Len (ushort Expression);
[<System.CLSCompliant(false)>]
static member Len : uint16 -> int
static member Len : uint16 -> int
Public Function Len (Expression As UShort) As Integer

Parametreler

Expression
UInt16

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Öznitelikler

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(String)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::String ^ Expression);
public static int Len (string? Expression);
public static int Len (string Expression);
static member Len : string -> int
Public Function Len (Expression As String) As Integer

Parametreler

Expression
String

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Single)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(float Expression);
public static int Len (float Expression);
static member Len : single -> int
Public Function Len (Expression As Single) As Integer

Parametreler

Expression
Single

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(SByte)

Önemli

Bu API, CLS uyumlu değildir.

CLS uyumlu alternatif
Microsoft.VisualBasic.Strings.Len(Byte)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::SByte Expression);
[System.CLSCompliant(false)]
public static int Len (sbyte Expression);
public static int Len (sbyte Expression);
[<System.CLSCompliant(false)>]
static member Len : sbyte -> int
static member Len : sbyte -> int
Public Function Len (Expression As SByte) As Integer

Parametreler

Expression
SByte

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Öznitelikler

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Object)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::Object ^ Expression);
public static int Len (object? Expression);
public static int Len (object Expression);
static member Len : obj -> int
Public Function Len (Expression As Object) As Integer

Parametreler

Expression
Object

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Int64)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(long Expression);
public static int Len (long Expression);
static member Len : int64 -> int
Public Function Len (Expression As Long) As Integer

Parametreler

Expression
Int64

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Int16)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(short Expression);
public static int Len (short Expression);
static member Len : int16 -> int
Public Function Len (Expression As Short) As Integer

Parametreler

Expression
Int16

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Double)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(double Expression);
public static int Len (double Expression);
static member Len : double -> int
Public Function Len (Expression As Double) As Integer

Parametreler

Expression
Double

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Decimal)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::Decimal Expression);
public static int Len (decimal Expression);
static member Len : decimal -> int
Public Function Len (Expression As Decimal) As Integer

Parametreler

Expression
Decimal

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(DateTime)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(DateTime Expression);
public static int Len (DateTime Expression);
static member Len : DateTime -> int
Public Function Len (Expression As DateTime) As Integer

Parametreler

Expression
DateTime

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Char)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(char Expression);
public static int Len (char Expression);
static member Len : char -> int
Public Function Len (Expression As Char) As Integer

Parametreler

Expression
Char

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Byte)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(System::Byte Expression);
public static int Len (byte Expression);
static member Len : byte -> int
Public Function Len (Expression As Byte) As Integer

Parametreler

Expression
Byte

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Boolean)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(bool Expression);
public static int Len (bool Expression);
static member Len : bool -> int
Public Function Len (Expression As Boolean) As Integer

Parametreler

Expression
Boolean

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır

Len(Int32)

Bir dizedeki karakter sayısını veya bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı döndürür.Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

public:
 static int Len(int Expression);
public static int Len (int Expression);
static member Len : int -> int
Public Function Len (Expression As Integer) As Integer

Parametreler

Expression
Int32

Herhangi bir geçerli String ifade veya değişken adı.Any valid String expression or variable name. ExpressionTürü ise Object , Len işlev tarafından dosyaya yazılacak şekilde işlev boyutunu döndürür FilePut .If Expression is of type Object, the Len function returns the size as it will be written to the file by the FilePut function.

Döndürülenler

Int32

Bir dizedeki karakter sayısını ya da bir değişkeni depolamak için gereken nominal bayt sayısını içeren bir tamsayı.An integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

Örnekler

Bu örnek Len , bir dizedeki karakter sayısını döndürmek için kullanır.This example uses Len to return the number of characters in a string.

' Initializes variable.
Dim testString As String = "Hello World"
' Returns 11.
Dim testLen As Integer = Len(testString)

Açıklamalar

Kullanıcı tanımlı türler ve Object değişkenlerle, Len işlev, işleve göre dosyaya yazılacak şekilde boyutu döndürür FilePut .With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. Bir Object içeriyorsa String , dize uzunluğunu döndürür.If an Object contains a String, it will return the length of the string. ObjectBaşka herhangi bir tür içeriyorsa, işlev tarafından dosyaya yazılacak şekilde nesnenin boyutunu döndürür FilePut .If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.

VBFixedStringÖzniteliği, diske yazıldığında dizenin boyutunu bayt cinsinden göstermek için nesnelerdeki dize alanlarına uygulanabilir.The VBFixedString attribute can be applied to string fields in objects to indicate the size of the string, in bytes, when written to disk. Lenİşlev, varsa, VBFixedString değişkenlerin boyutunu belirlerken özniteliğini kullanır Object .The Len function uses the VBFixedString attribute, if available, when determining the size of Object variables.

Not

Lenİşlev, Kullanıcı tanımlı veri türlerinde değişken uzunluklu dizeler ile kullanıldığında gerekli olan depolama baytlarının gerçek sayısını tespit edemeyebilir.The Len function may not be able to determine the actual number of storage bytes required when used with variable-length strings in user-defined data types.

Not

LenBVisual Basic önceki sürümlerindeki işlev karakter yerine bir dizedeki bayt sayısını döndürür.The LenB function in earlier versions of Visual Basic returns the number of bytes in a string rather than characters. Esas olarak çift baytlı karakter kümesi (DBCS) uygulamalarında dize dönüştürmek için kullanılır.It is used primarily for converting strings in double-byte character set (DBCS) applications. Tüm geçerli Visual Basic dizeleri Unicode ve LenB artık desteklenmiyor.All current Visual Basic strings are in Unicode, and LenB is no longer supported.

Akıllı Cihaz Geliştirici NotlarıSmart Device Developer Notes

Lenİşlevi yalnızca String Object parametre olarak değişkenleri kabul eder.The Len function accepts only String and Object variables as parameters. Bir Object içeriyorsa String ,, uzunluğunu döndürür String .If an Object contains a String, it will return the length of the String. Bir parametre NULL bir başvuru ise Object , işlev sıfır döndürür.If a parameter is a NULL Object reference, the function returns zero. Başka bir Object tür içeriyorsa, bir özel durum oluşturulur.If an Object contains any other type, an exception is thrown.

Ayrıca bkz.

Şunlara uygulanır