KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I say public static IMyType GetGateWayManager() { IUnityContainer _container = GetContainer(); IMyType _gateWayManager = _container.Resolve<IMyType>(); return _gateWayManager; } it comes with a warning saying Use implicitly types local variable . If I change it to public static IMyType GetGateWayManager() { IUnityContainer _container = GetContainer(); var _gateWayManager = _container.Resolve<IMyType>(); return _gateWayManager; } it is fine. Can anyone can tell me why the VS editor thinks it is best practice to use var here?
Tags (comma-separated)
Save Edits
Cancel