VBFixedStringAttribute クラス
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)

<AttributeUsageAttribute(AttributeTargets.Field, Inherited:=False, AllowMultiple:=False)> _ Public NotInheritable Class VBFixedStringAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Field, Inherited=false, AllowMultiple=false)] public sealed class VBFixedStringAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Field, Inherited=false, AllowMultiple=false)] public ref class VBFixedStringAttribute sealed : public Attribute

詳細については、Visual Basic のトピック「VBFixedStringAttribute クラス」を参照してください。
Visual Basic 文字列は、既定で可変長になっています。この属性は、FileGet や FilePut など、固定長の配列を必要とする Visual Basic ファイルの入力関数および出力関数を使用する場合に便利です。

Structure Person Public ID As Integer Public MonthlySalary As Decimal Public LastReviewDate As Long <VBFixedString(15)> Public FirstName As String <VBFixedString(15)> Public LastName As String <VBFixedString(15)> Public Title As String <VBFixedString(150)> Public ReviewComments As String End Structure
![]() |
---|
VBFixedStringAttribute は情報を提供するものであり、可変長文字列から固定長文字列への変換には使用できません。この属性の目的は、VBFixedStringAttribute を認識するメソッドまたは API 呼び出しにおける、構造体および非ローカル変数に含まれている配列の使用方法を変更することです。この属性は文字列の実際の長さを変更するものではありません。 |

System.Attribute
Microsoft.VisualBasic.VBFixedStringAttribute


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- VBFixedStringAttribute クラスのページへのリンク