Browse Source

Fix typo & improve styling in Basic Operations

pull/988/head
Hsu Still 7 years ago
parent
commit
f0b3a3439c
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      docs/faq/basic-operations.md

+ 5
- 2
docs/faq/basic-operations.md View File

@@ -3,9 +3,12 @@
## How should I safely check a type?
In Discord.NET, the idea of polymorphism is used throughout. You may
need to cast the object as a certain type before you can perform any
action. There are several ways to cast, with direct casting
`(Type)type` being the the least recommended, as it *can* throw an
action.

There are several ways to cast, with direct casting
`(Type)type` being **the least recommended**, as it *can* throw an
[InvalidCastException] when the object isn't the desired type.

Please refer to [this post] for more details.

A good and safe casting example:


Loading…
Cancel
Save