Fluent Assertions Documentation
FluentAssertions Namespace / AssertionExtensions Class / As<TTo> Method
The System.Type to cast subject to
In This Topic
    As<TTo> Method
    In This Topic
    Safely casts the specified object to the type specified through TTo.
    Syntax
    [Extension()]
    public static TTo As<TTo>( 
       object subject
    )

    Parameters

    subject

    Type Parameters

    TTo
    The System.Type to cast subject to
    Remarks
    Has been introduced to allow casting objects without breaking the fluent API.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also