FileExtensionVector class

Applies to Windows and Windows Phone

Represents a random-access collection of file name extensions.

Syntax


public ref class FileExtensionVector sealed : IVector<String^>,
    IIterable<String^>

Attributes

[Version(0x06020000)]

Members

The FileExtensionVector class has these types of members:

Methods

The FileExtensionVector class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Add [C#, VB]Adds a new item to the collection.
Append [C++, JavaScript]Appends a file name extension to the end of the collection.
Clear Removes all file name extensions from the collection.
Contains [C#, VB]Determines whether an element is in the collection.
CopyTo [C#, VB]Copies the elements of the collection to an array, starting at a particular array index.
First [C++, JavaScript]Retrieves an iterator that iterates through the file name extensions in the collection.
GetAt [C++, JavaScript]Retrieves the file name extension at the specified index in the collection.
GetMany [C++, JavaScript]Retrieves the file name extensions that start at the specified index in the collection.
GetView [C++, JavaScript]Retrieves an immutable view of the collection of file name extensions.
IndexOf [C++, JavaScript]Retrieves the index of a specified file name extension in the collection.
IndexOf [C#, VB]Determines the index of a specific item in the collection.
Insert [C#, VB]Inserts an item into the collection at the specified index.
InsertAt [C++, JavaScript]Inserts a file name extension into a collection at a specified index.
Remove [C#, VB]Removes the first occurrence of a specific object from the collection.
RemoveAt [C++, JavaScript]Removes the file name extension at the specified index in the collection.
RemoveAt [C#, VB]Removes the element at the specified index of the collection.
RemoveAtEnd [C++, JavaScript]Removes the last file name extension from the collection.
ReplaceAll [C++, JavaScript]Replaces all file name extensions in the collection with the specified file name extensions.
SetAt [C++, JavaScript]Sets the file name extension at the specified index of the collection.

 

Properties

The FileExtensionVector class has these properties.

PropertyAccess typeDescription

Count [C#, VB]

Read-onlyGets the number of elements contained in the collection.

IsReadOnly [C#, VB]

Read-onlyGets a value indicating whether the collection is read-only.

Item [C#, VB]

Read/writeGets or sets the element at the specified index.

Size [C++, JavaScript]

Read-onlyGets the number of file name extensions in the collection.

 

Remarks

Collection member lists

For JavaScript, FileExtensionVector has the members shown in the member lists. In addition, FileExtensionVector supports a length property, members of Array.prototype, and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

A FileExtensionVector is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<String> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with a String constraint.

Examples

The File picker sample demonstrates how to specify the file types that the user can see and pick from in the file picker.

No code example is currently available or this language may not be supported.

The File picker sample demonstrates how to show files of any type in the file picker for the user to pick from.

No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Storage.Pickers
Windows::Storage::Pickers [C++]

Metadata

Windows.winmd

See also

File picker sample
Quickstart: Accessing files with file pickers
fileOpenPicker.fileTypeFilter property
folderPicker.fileTypeFilter property

 

 

Show:
© 2014 Microsoft