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.

Advertisement

Hello, visitor! These forums are run off of the revenue generated from these ads. If you'd like to support us, please whitelist us or consider donating:

#1 2017-06-19 10:48:21

italkalotfromee
Member
Joined: 2015-05-08
Posts: 27

Since.. when?

Been programing for about a year and I never knew it was a violation to not capitalize the voids name.. neutral
CKHbUlBpR7aq141G5lDxTg.png


FluxBB bbcode test

Offline

#2 2017-06-19 11:23:12

destroyer123
Member
From: England
Joined: 2016-06-03
Posts: 733

Re: Since.. when?

There is nothing technically wrong with not using capitolised subroutines (functions and voids), its just what people tend to do, so it helps identify whats what
I think they just recently decided to add some conventions to help people write code similarly to other people so its more easily understandable by everyone
Edit: Actually, I think this is one of the new features in Visual Studio 2017 (I didnt even know it was a thing :O)

The main nameing 'rules' are as follows:
For variables use camel case beginning with a lowercase letter, e.g. someVariable
For constants use all caps, with underscores instead of spaces, e.g. SOME_CONSTANT
For subroutines use camel case beginning with an uppercase letter, e.g. SomeSubroutine

Last edited by destroyer123 (2017-06-19 11:30:20)

Offline

Wooted by:

#3 2017-06-19 15:28:38

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 856

Re: Since.. when?

Yeah, this is just a naming convention. You should be able to turn those messages off.
There's nothing wrong, just something most C# programmers use.

Official C# (language like Java or C++ are completely different) naming conventions, are a bit different that what destroyer said:
public variables and methods are PascalCase (Java has constants in all caps);
private variables and methods are always camelCase;
classes and constants are always PascalCase.


Current project: Thinking of/finding/requesting projects...
?type=registered&name=den3107     ?type=itemsbought&name=den3107
user.php?id=den3107&hideoffline=true    user.php?id=den3107bot&hideoffline=true

Offline

#4 2017-06-19 18:14:00

XxAtillaxX
Member
From: Canada
Joined: 2015-11-28
Posts: 3,311
Website

Re: Since.. when?

It's not illegal to use different casing, and it's not enabled by default on Visual Studio 2017, to be clear.
I'd say go with whatever style you want. Though, when contributing to an open-source project, it's a good idea to keep the convention used in mind, and try to conform to it.

It's not very hard to disable though from Tools->Options, a quick Google search would suffice.
t9ZsUn82L0.png

Offline

Wooted by:

#5 2017-06-19 23:50:40

italkalotfromee
Member
Joined: 2015-05-08
Posts: 27

Re: Since.. when?

Also another question since all here to help..

is it possible to get the server time? In C#? There's no GetServerTime function so.. any tips??


FluxBB bbcode test

Offline

#6 2017-06-19 23:54:44

destroyer123
Member
From: England
Joined: 2016-06-03
Posts: 733

Re: Since.. when?

italkalotfromee wrote:

Also another question since all here to help..

is it possible to get the server time? In C#? There's no GetServerTime function so.. any tips??

What do you mean get the server time? Your computers time? The EE servers time? The actual time from some server?

Offline

#7 2017-06-20 00:06:15

italkalotfromee
Member
Joined: 2015-05-08
Posts: 27

Re: Since.. when?

destroyer123 wrote:

What do you mean get the server time? Your computers time? The EE servers time? The actual time from some server?

The EE servers time.


FluxBB bbcode test

Offline

#8 2017-06-20 00:27:06

destroyer123
Member
From: England
Joined: 2016-06-03
Posts: 733

Re: Since.. when?

italkalotfromee wrote:
destroyer123 wrote:

What do you mean get the server time? Your computers time? The EE servers time? The actual time from some server?

The EE servers time.

The time message I think, although I don't see why you'd need the servers time specifically... It should be approx the same as your computers time, in which case I think it's DateTime.Now, which you should be able to use to get whatever info you need

Offline

#9 2017-06-20 00:35:55

XxAtillaxX
Member
From: Canada
Joined: 2015-11-28
Posts: 3,311
Website

Re: Since.. when?

italkalotfromee wrote:

Also another question since all here to help..

is it possible to get the server time? In C#? There's no GetServerTime function so.. any tips??

Player.IO always uses the UTC timezone, but if you mean the physical timezone of the server then you'll need to retrieve the IP address of the particular server you're sending messages to.
There's no built-in way for PlayerIOClient to do this. However, you can use PlayerIOClient.Helpers which can get the Endpoint via reflection in the normal PlayerIOClient. Optionally, you can make a slight modification to OPIO.PlayerIOClient, an open-source PlayerIOClient, to have the Endpoint exposed as a public property.

Last edited by XxAtillaxX (2017-06-20 00:36:20)

Offline

XxAtillaxX1497915355664643

Board footer

Powered by FluxBB

[ Started around 1498331593.9988 - Generated in 0.029 seconds, 13 queries executed - Memory usage: 1.15 MiB (Peak: 1.28 MiB) ]