Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-12-11 23:19:06, last edited by drunkbnu (2016-12-11 23:20:05)

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Message

The event argument handler is commonly defined "e". PlayerIOClient.Message is an event argument handler, and so I'd look it as a default by defining it "e".

con.OnMessage += delegate (object sender, Message e) { // ... }

Yet I see many people defining Message "m". I'd like to know why this choice. I work on my projects defining Message "e".

Offline

#2 2016-12-11 23:25:27

Era
Member
From: ::1
Joined: 2015-05-06
Posts: 884

Re: Message

i do this because the word message starts with m

Offline

Wooted by: (2)

#3 2016-12-12 02:32:33, last edited by Tomahawk (2016-12-12 02:35:35)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: Message

PlayerIOClient.Message is not an event handler or "event argument handler".

Documentation: https://playerio.com/documentation/refe … ry.message


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#4 2016-12-12 02:35:41

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: Message

OnMessage is an EventHandler and Message is the EventArgs, which is often specified as 'e'.


signature.png
*u stinky*

Offline

#5 2016-12-12 09:26:19

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Message

I generally define my exceptions using e (instead of the common ex), plus, as said by Era, "Message" starts with "m".

@Atilla
Message is an event argument (trivial description) not an EventArgs (actual Object type). Eitherway it'd obviously still start with "e".

P.S. Player.IO themselves also use "m" instead of "e".

Offline

#6 2016-12-12 09:42:25, last edited by XxAtillaxX (2016-12-12 09:42:57)

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: Message

den3107 wrote:

@Atilla
Message is an event argument (trivial description) not an EventArgs (actual Object type). Eitherway it'd obviously still start with "e".

That's not a correction, it's semantics.

Player.IO doesn't always use 'm', either.

Hidden text

signature.png
*u stinky*

Offline

Wooted by:
XxAtillaxX1481532145639224

Board footer

Powered by FluxBB

[ Started around 1732735496.7274 - Generated in 0.034 seconds, 12 queries executed - Memory usage: 1.44 MiB (Peak: 1.56 MiB) ]