Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.49 KB

operator-windows-ui-xaml-interop-typename.md

File metadata and controls

47 lines (31 loc) · 1.49 KB
title operator Windows::UI::Xaml::Interop::TypeName
description Learn more about: operator Windows::UI::Xaml::Interop::TypeName
ms.date 12/30/2016

operator Windows::UI::Xaml::Interop::TypeName

Enables conversion from Platform::Type to Windows::UI::Xaml::Interop::TypeName.

Syntax

Operator TypeName(Platform::Type^ type);

Return Value

Returns a Windows::UI::Xaml::Interop::TypeName when given a Platform::Type^.

Remarks

TypeName is the language-neutral Windows Runtime struct for representing type information. Platform::Type is specific to C++ and can't be passed across the application binary interface (ABI). Here's one use of TypeName, in the Navigate function:

rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments);

Example

The next example shows how to convert between TypeName and Type.

// Convert from Type to TypeName
Windows::UI::Xaml::Interop::TypeName tn = TypeName(MainPage::typeid);

// Convert back from TypeName to Type
Type^ tx2 = (Type^)(tn);

.NET Framework Equivalent

.NET Framework programs project TypeName as System.Type.

See also

operator Windows::UI::Xaml::Interop::TypeName
Platform::Type Class