Skip to content

Commit 8c9443f

Browse files
authored
simplifyinfg (#3764)
1 parent ffaaadf commit 8c9443f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

uwp/cpp-and-winrt-apis/base-type.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct BgLabelControl : BgLabelControlT<BgLabelControl>
4141

4242
*Overridable* methods present themselves differently in different language projections. In C#, for example, overridable methods typically appear as protected virtual methods. In C++/WinRT, they're neither virtual nor protected, but you can still override them and provide your own implementation, as shown above.
4343

44-
If you're overriding one of these overridable methods in C++/WinRT, then your `runtimeclass` IDL mustn't declare the method.
44+
If you're overriding one of these overridable methods in C++/WinRT, then your `runtimeclass` IDL mustn't declare the method. For more info about the `base_type` syntax shown, see the next section in this topic ([Calling your base type](#calling-your-base-type)).
4545

4646
**IDL**
4747

@@ -74,16 +74,17 @@ namespace winrt::Example::implementation
7474

7575
## Calling your base type
7676

77-
You can access your bass type, and call methods on it, by using the type alias `base_type`. This is just an example of the syntax of calling `base_type` (this isn't a full illustration of how to perform layout in a custom layout panel):
77+
You can access your base type, and call methods on it, by using the type alias `base_type`. We saw an example of this in the previous section; but you can use `base_type` to access any base class member (not just overriden methods). Here's an example:
7878

7979
```cppwinrt
80-
struct CustomGrid : CustomGridT<CustomGrid>
80+
struct MyDerivedRuntimeClass : MyDerivedRuntimeClassT<MyDerivedRuntimeClass>
8181
{
82-
CustomGrid() {}
82+
...
8383
84-
Size ArrangeOverride(Size const& finalSize)
84+
void Foo()
8585
{
86-
return base_type::ArrangeOverride(finalSize);
86+
// Call my base type's Bar method.
87+
base_type::Bar();
8788
}
8889
};
8990
```

0 commit comments

Comments
 (0)