public static IsReadOnlyField ( IField field ) : bool | ||
field | IField | |
return | bool |
static bool CanLoadAddress(Node node) { IEntity entity = node.Entity; if (null == entity) { return(true); } switch (entity.EntityType) { case EntityType.Local: { return(!((InternalLocal)entity).IsPrivateScope); } case EntityType.Parameter: { return(true); } case EntityType.Field: { return(!TypeSystemServices.IsReadOnlyField((IField)entity)); } } return(false); }
static bool CanLoadAddress(Node node) { var entity = node.Entity; if (entity == null || node is SelfLiteralExpression) { return(true); } switch (entity.EntityType) { case EntityType.Local: return(!((InternalLocal)entity).IsPrivateScope); case EntityType.Parameter: return(true); case EntityType.Field: return(!TypeSystemServices.IsReadOnlyField((IField)entity)); } return(false); }