| title | operator Windows::UI::Xaml::Interop::TypeName | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 12/30/2016 | |
| ms.technology | cpp-windows | |
| ms.reviewer | ||
| ms.suite | ||
| ms.tgt_pltfrm | ||
| ms.topic | language-reference | |
| ms.assetid | a65a105e-7e3a-452f-932f-2cdaf00fbba5 | |
| caps.latest.revision | 5 | |
| author | ghogen | |
| ms.author | ghogen | |
| manager | ghogen | |
| ms.workload |
|
Enables conversion from Platform::Type to Windows::UI::Xaml::Interop::TypeName.
Operator TypeName(Platform::Type^ type) Returns a Windows::UI::Xaml::Interop::TypeName when given a Platform::Type^.
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);
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 programs project TypeName as System.Type.
operator Windows::UI::Xaml::Interop::TypeName
Platform::Type Class