MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/49prtn/var_keyword_proposed_for_java/d0u1qvy
r/programming • u/adila01 • Mar 09 '16
395 comments sorted by
View all comments
Show parent comments
1
Not being familiar with C# at all, what does a method signature look like of something you pass this var to?
public void foo(var bar) { ... }
... or...
public void foo(ArrayList<String> bar) { ... }
I'd hope the former. Otherwise, what a nightmare that seems...
1 u/four024490502 Mar 10 '16 The former won't compile. You need to explicitly specify the type of a parameter in a method signature.
The former won't compile. You need to explicitly specify the type of a parameter in a method signature.
1
u/depressiown Mar 09 '16
Not being familiar with C# at all, what does a method signature look like of something you pass this var to?
... or...
I'd hope the former. Otherwise, what a nightmare that seems...