I think that for understanding the specific situation in your example this may not matter much, but it is important to consider that the dynamic creator is created at runtime, so you do not need something to be disabled, just getting a return form, for example, what to do if instead you needed to not be attached to the dynamic, but to list
static dynamic CreateMagicList() { return new List<string>(); } List<string> list = CreateMagicList(); list.Add( "lolcat" );
this will work just fine since at runtime you are bound to the same property
but this one
static object CreateMagicList() { return new List<string>(); } List<string> list = CreateMagicList(); list.Add( "lolcat" );
will give you an error message, since you need to delete it
source share