Преглед на файлове

Update C# code example

Use the `Root` property instead of the deprecated `GetRoot` method.
`PropagateNotification` accepts an `int` and not a `long`, and so `NotificationWmCloseRequest` needs to be cast to `int`.
Curtis преди 2 години
родител
ревизия
4342e03419
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      tutorials/inputs/handling_quit_requests.rst

+ 1 - 1
tutorials/inputs/handling_quit_requests.rst

@@ -82,7 +82,7 @@ program termination, you should send the notification yourself:
 
  .. code-tab:: csharp
 
-    GetTree().GetRoot().PropagateNotification(NotificationWmCloseRequest)
+    GetTree().Root.PropagateNotification((int)NotificationWmCloseRequest)
 
 Sending this notification will inform all nodes about the program termination,
 but will not terminate the program itself *unlike in 3.X*. In order to achieve