Featured post
Is it considered accepted using var's as "shortcuts" in c#? -
one use var type in c# seems shortcuts/simplifying/save unnecessary typing. 1 thing i've considered this:
myapp.properties.settings.default.value=1;
that's ton of unnecessary code. alternative declaring:
using myapp.properties;
-- or --
using appsettings = myappp.properties.settings;
leading to: appsettings.default.value=1 or settings.default.value=1
abit better, i'd shorter still:
var appsettings = myfirstcsharpapp.properties.settings.default; appsettings.value=1;
finally, it's short enough, , used other annoyingly long calls accepted way of doing it? i'm considering whether "shortcut var" pointing existing instance of whatever i'm making shortcut too? (obviously not settings in example)
it's acceptable code in compiler take , know it. it's acceptable code logically in shortens code later. it's not different defining variable type (int/bool/whatever) rather saying var. when you're in studio, putting mouse of variable gives compiled type, there shouldn't real issue it. might call lazy, laziness mother of invention. long code doesn't become unreadable, can't see how of problem.
- Get link
- X
- Other Apps
Comments
Post a Comment