Mono.CSharp.Report.Warning C# (CSharp) Method

Warning() public method

public Warning ( int code, int level, string format, string arg1, string arg2 ) : void
code int
level int
format string
arg1 string
arg2 string
return void
		public void Warning (int code, int level, string format, string arg1, string arg2)
		{
			Warning (code, level, Location.Null, format, arg1, arg2);
		}

Same methods

Report::Warning ( int code, int level, Mono.CSharp.Location loc, string message ) : void
Report::Warning ( int code, int level, Mono.CSharp.Location loc, string format, string arg ) : void
Report::Warning ( int code, int level, Mono.CSharp.Location loc, string format, string arg1, string arg2 ) : void
Report::Warning ( int code, int level, string message ) : void
Report::Warning ( int code, int level, string format, string arg ) : void

Usage Example

Example #1
0
        protected override bool CheckBase()
        {
            if (!base.CheckBase())
            {
                return(false);
            }

            MemberSpec candidate;
            bool       overrides       = false;
            var        conflict_symbol = MemberCache.FindBaseMember(this, out candidate, ref overrides);

            if (conflict_symbol == null)
            {
                conflict_symbol = candidate;
            }

            if (conflict_symbol == null)
            {
                if ((ModFlags & Modifiers.NEW) != 0)
                {
                    Report.Warning(109, 4, Location, "The member `{0}' does not hide an inherited member. The new keyword is not required",
                                   GetSignatureForError());
                }
            }
            else
            {
                if ((ModFlags & (Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.BACKING_FIELD)) == 0)
                {
                    Report.SymbolRelatedToPreviousError(conflict_symbol);
                    Report.Warning(108, 2, Location, "`{0}' hides inherited member `{1}'. Use the new keyword if hiding was intended",
                                   GetSignatureForError(), conflict_symbol.GetSignatureForError());
                }

                if (conflict_symbol.IsAbstract)
                {
                    Report.SymbolRelatedToPreviousError(conflict_symbol);
                    Report.Error(533, Location, "`{0}' hides inherited abstract member `{1}'",
                                 GetSignatureForError(), conflict_symbol.GetSignatureForError());
                }
            }

            return(true);
        }
All Usage Examples Of Mono.CSharp.Report::Warning