Opinion needed : which one is looking better ?
+2
BIT0208-Shuvo
BIT0112-Rokon
6 posters
Page 1 of 1
Opinion needed : which one is looking better ?
We all know that, a variable name starts with small letter in Java. Now looks carefully my example :-
Take One:
Take Two:
Now tell me which one is looking good. Whats you opinion..?
Edit:
removed specific language terms, thanks to Amit:)
Take One:
Take Two:
Now tell me which one is looking good. Whats you opinion..?
Edit:
removed specific language terms, thanks to Amit:)
Last edited by BIT0112-Rokon on Fri May 06, 2011 1:17 am; edited 1 time in total (Reason for editing : removed specific language terms, thanks to Amit:))
Re: Opinion needed : which one is looking better ?
Definitely the code written in Java is looking good because it's easy to differentiate between a class and a variable which isn't possible in the next code written in C#.
BIT0208-Shuvo- Global Moderator-RC
- Course(s) :
- BIT
Blood Group : B+
Posts : 87
Points : 124
Re: Opinion needed : which one is looking better ?
Are you sure?
Because in C#, if I remember correctly, variable names are started with small character. In case of private members, it is started with an underscore(_) .
Starting with small later is also called Camel Case notation.
The only time when .NET uses Pascal case notation is when the variable is
given property. I.E.
Where we can directly get or set the value of that variable. The reason is that the variable, when property given variable becomes the function itself. And we know that in C#, function names are Pascal Case.
Can you provide the references based on which you are claiming that variable names are PasCal Case in C#?
Edit:
Can you please improve the topic title? It does not exactly represent what is being compared here.
Because in C#, if I remember correctly, variable names are started with small character. In case of private members, it is started with an underscore(_) .
Starting with small later is also called Camel Case notation.
The only time when .NET uses Pascal case notation is when the variable is
given property. I.E.
- Code:
int Name{ get; set; }
Where we can directly get or set the value of that variable. The reason is that the variable, when property given variable becomes the function itself. And we know that in C#, function names are Pascal Case.
Can you provide the references based on which you are claiming that variable names are PasCal Case in C#?
Edit:
Can you please improve the topic title? It does not exactly represent what is being compared here.
Re: Opinion needed : which one is looking better ?
Thats great! Amit!
I knew that,
But i just wanted to know your opinion guys, which one is looking better.
there are no references available man, it was just a thought.
Im also agree with shuvo, its better to start with small letter.
I knew that,
But i just wanted to know your opinion guys, which one is looking better.
there are no references available man, it was just a thought.
Im also agree with shuvo, its better to start with small letter.
Re: Opinion needed : which one is looking better ?
>.> Dude, maybe it was just a thought for you, but you presented like it was the convention. Look at Shuvo, he now thinks that .NET convention is to write variable names using Pascal Case notation.
And I went through 3 websites containing C# naming conventions because I had to make sure that what I was saying was correct.
edit: Erm, did you notice the edit in my previous post?
And I went through 3 websites containing C# naming conventions because I had to make sure that what I was saying was correct.
edit: Erm, did you notice the edit in my previous post?
Re: Opinion needed : which one is looking better ?
- offtopic:
A whole lot more better Thanks man.
And RPP for this topic. it is kinda interesting!
Re: Opinion needed : which one is looking better ?
Both are good.
Its all about being used to.
I think the class name in C# example should be login, not Login. Is it?
Its all about being used to.
I think the class name in C# example should be login, not Login. Is it?
BIT0102-Mohaimin- Programmer
- Course(s) :
- BIT
Blood Group : B+
Posts : 415
Points : 715
Re: Opinion needed : which one is looking better ?
nope man, its Login, class name always start with capital both in Java and C#.
You probably confused about string.
string is an alias for System.String in .Net. They compile to the same code, so at execution time there is no difference whatsoever.
You probably confused about string.
string is an alias for System.String in .Net. They compile to the same code, so at execution time there is no difference whatsoever.
Re: Opinion needed : which one is looking better ?
The code written in Java is looking good because it's easy to differentiate between a class and a variable which isn't possible in the next code written in C#.
_________________
Overseas consultants in India
_________________
Overseas consultants in India
adamricky- Pre-Alpha Release
- Course(s) :
- N/A
Blood Group : NULL
Posts : 5
Points : 5
Re: Opinion needed : which one is looking better ?
Personally, i like the first code.
Also, the second code doesn't follow C# convention either. For variables, both Java and C# have the same convention.
Also, the second code doesn't follow C# convention either. For variables, both Java and C# have the same convention.
BIT0130-Shakkhor- Programmer
- Course(s) :
- BIT
Blood Group : B+
Posts : 209
Points : 328
Similar topics
» Opinion Needed: No Negative Voting
» Opinion needed : chatting in Forum - Default or IRC?
» Help needed
» JSDK needed
» Java Help needed: Problem with using graphics
» Opinion needed : chatting in Forum - Default or IRC?
» Help needed
» JSDK needed
» Java Help needed: Problem with using graphics
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford