Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文档问题 #4

Open
Cyl18 opened this issue Nov 7, 2021 · 1 comment
Open

文档问题 #4

Cyl18 opened this issue Nov 7, 2021 · 1 comment

Comments

@Cyl18
Copy link

Cyl18 commented Nov 7, 2021

/// 消息类型(群、私聊、讨论组)。不建议使用本属性判断类型,请使用 <c>is</c> 运算符进行判断。

这里说不建议使用本属性判断类型 又说请使用 is 运算符进行判断 但是没有说该怎么判断 希望能补全文档
(我猜测是想要 sth is Message.PrivateType?)

@b11p
Copy link
Contributor

b11p commented Nov 8, 2021

是这么用的

Sisters.WudiLib.Posts.Message someMsgCtx = ...
if (someMsgCtx is Sisters.WudiLib.Posts.GroupMessage g)
{
    // g.GroupId...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants