I am learning ASP.net MVC 4, I already understand the MVC pattern and logic. I completed some tutorials from the internet and I found people mixing up these two notations 'ViewBag' and '@ViewBag' in the Controller-class. So I'm a little bit confused when to use '@ViewBag' and/or 'ViewBag'. Is there a difference between them? Or am I free to choose which notation to use when coding?
Check this Controller class code:
public ActionResult Index()
{
ViewBag.Weights = new List<string>(weightLst);
@ViewBag.Statuses = new List<Status>(statuses);
return View();
}