Mono.CSharp.Field.DoMemberTypeDependentChecks C# (CSharp) Method

DoMemberTypeDependentChecks() protected method

protected DoMemberTypeDependentChecks ( ) : void
return void
		protected override void DoMemberTypeDependentChecks ()
		{
			if ((ModFlags & Modifiers.BACKING_FIELD) != 0)
				return;

			base.DoMemberTypeDependentChecks ();

			if ((ModFlags & Modifiers.VOLATILE) != 0) {
				if (!CanBeVolatile ()) {
					Report.Error (677, Location, "`{0}': A volatile field cannot be of the type `{1}'",
						GetSignatureForError (), MemberType.GetSignatureForError ());
				}

				if ((ModFlags & Modifiers.READONLY) != 0) {
					Report.Error (678, Location, "`{0}': A field cannot be both volatile and readonly",
						GetSignatureForError ());
				}
			}
		}