what are valid c# variable name a) Bad_Var b) PersonAge c) #PersonName# d) 1Star | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what are valid c# variable name a) Bad_Var b) PersonAge c) #PersonName# d) 1Star

help me plz I tried but I failed this test help me out plz guys

21st Oct 2016, 8:40 AM
Sheikha Ali
Sheikha Ali - avatar
20 Answers
+ 10
Bad_Var PersonAge A C# variable can contain letters, numbers and underscores (_), but can't start with a number.
21st Oct 2016, 10:20 AM
Zen
Zen - avatar
+ 3
option A and B are valid.
26th Oct 2016, 2:45 PM
Ravi Gondalia
+ 2
PersonAge, Bad_Var is the correct answer, as both of them are not starting from a number or special character,. Also, they are following all the conditions that should be there being a c# variable name.
1st Nov 2016, 5:32 PM
Uplabdhi Singh
Uplabdhi Singh - avatar
+ 1
bad_var , personAge is correct answer
15th Jan 2017, 4:58 PM
parva academy (manager hosein molazade)
parva academy (manager hosein molazade) - avatar
0
Needs ti start with letter or underscore.. So a and b
21st Oct 2016, 2:23 PM
ClutchMeister
ClutchMeister - avatar
0
Option B (PersonAge)... it's the only one that fully complies with the language's good practices.
22nd Oct 2016, 4:57 AM
Hanike T.
Hanike T. - avatar
0
you right fast name and second think is intiger edit
8th Nov 2016, 2:47 PM
Imtiyaz ahamd
Imtiyaz ahamd - avatar
0
it can't start with anything that's not a letter
11th Nov 2016, 5:05 PM
[No Name]
[No Name] - avatar
0
a,b
12th Nov 2016, 8:59 PM
Игры и Арко
Игры и Арко - avatar
0
Bad_ Var PersonAge
6th Dec 2016, 10:41 PM
Amit Kumar
Amit Kumar - avatar
0
c#variable the correct answer percentage and bad_var
7th Dec 2016, 11:58 AM
Srivardhan Naidu
Srivardhan Naidu - avatar
0
how Bad_Var? idk that Bad Variable is variable name. why?
15th Dec 2016, 9:19 PM
Rastislav
Rastislav - avatar
0
Bad_Var PersonAge but you might use camelCase notation it would be better and it's common use too like so: bad_Var badVar personAge etc
19th Dec 2016, 5:52 PM
Tarek Mostafa Mohamed
Tarek Mostafa Mohamed - avatar
0
b - a
6th Jan 2017, 7:09 PM
jad fawaz
jad fawaz - avatar
0
a) & b)
14th Jan 2017, 6:12 PM
Ajitha G R
Ajitha G R - avatar
- 1
bad_var personage
21st Oct 2016, 12:40 PM
Vinoth Kumar
Vinoth Kumar - avatar
- 1
Sheika, there are 2 correct answers for this question. the 2 that start with either a letter or an underscore are the correct one.
29th Oct 2016, 2:41 AM
iddi
- 3
duuuuuuuuude this is a question from the sololearn course. just go to the course comments. (they appearwhen you fail or pass the question) geez edit : sorry for the second line. i did not pay attention to the description
29th Nov 2016, 1:17 AM
julio
- 6
personAge
21st Oct 2016, 7:07 PM
aarthy
- 6
This question is broken.
25th Oct 2016, 3:23 PM
Aaron Johnson
Aaron Johnson - avatar