Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Translate Method
 Translate Method (Type, Boolean)

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
IdentityReferenceCollection..::.Translate Method (Type, Boolean)

Converts the objects in the collection to the specified type and uses the specified fault tolerance to handle or ignore errors associated with a type not having a conversion mapping.

Namespace:  System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Function Translate ( _
    targetType As Type, _
    forceSuccess As Boolean _
) As IdentityReferenceCollection
Visual Basic (Usage)
Dim instance As IdentityReferenceCollection
Dim targetType As Type
Dim forceSuccess As Boolean
Dim returnValue As IdentityReferenceCollection

returnValue = instance.Translate(targetType, _
    forceSuccess)
C#
public IdentityReferenceCollection Translate(
    Type targetType,
    bool forceSuccess
)
Visual C++
public:
IdentityReferenceCollection^ Translate(
    Type^ targetType, 
    bool forceSuccess
)
JScript
public function Translate(
    targetType : Type, 
    forceSuccess : boolean
) : IdentityReferenceCollection

Parameters

targetType
Type: System..::.Type
The type to which items in the collection are being converted.
forceSuccess
Type: System..::.Boolean
A Boolean value that determines how conversion errors are handled.
If forceSuccess is true, conversion errors due to a mapping not being found for the translation result in a failed conversion and exceptions being thrown.
If forceSuccess is false, types that failed to convert due to a mapping not being found for the translation are copied without being converted into the collection being returned.

Return Value

Type: System.Security.Principal..::.IdentityReferenceCollection
A IdentityReferenceCollection collection that represents the converted contents of the original collection.

Order is preserved in the returned collection, That is, the first item in the returned collection corresponds to the first item in the source collection, and so on, for each item in the collection.

The items in the source collection are not required to be of the same type.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker