I'm studying ASP.NET and saw the following code snippet:
ViewBag.QtdNovosComunicados =
(from
c in comunicados
where
c.DataCadastro > UsuarioLogado.dtUltimoAcesso
select
c).Count();
I understand that I am creating a new property in class ViewBag
.
But how will it define this dynamic property? .NET does this at runtime? Can type problems occur when I access this property later?