In ASP.NET, having a MasterPage and using C#, I can use ContentPlaceHolder with or without the new keyword and the quantity of method and properties from this class are the same.
I.e, both
ContentPlaceHolder ctph;
and
ContentPlaceHolder ctph = new ContenPlanceHolder();
have the same methods and properties. I don’t understand why I can use the ctph variable without the new keyword.
ctphhas the valuedefault(ContentPlaceHolder). for a reference type this will benull. For a value type this will be a valid object with all fields default initialized.ContentPlaceHolderis a reference type, so, when you say:Well, yeah, because those are defined by the type. Are you determining this via Intellisense? Umm… don’t. Try calling a method and see what happens.