The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
InstanceMethodCallFromStaticMethodError.cs
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
3 // Project rROTOR
4 // --------------------------------------------------------------------------
5 // File: InstanceMethodCallFromStaticMethodError.cs
6 // Author: Francisco Ortin francisco.ortin@gmail.com
7 // Description:
8 // Represents a error produced when an instance method is called from
9 // a static one, whithout using an object.
10 // --------------------------------------------------------------------------
11 // Create date: 25-04-2007
12 // Modification date: 25-04-2007
14 
15 using System;
16 using System.Collections.Generic;
17 using System.Text;
18 
19 namespace ErrorManagement {
25  #region Constructor
26 
35  public InstanceMethodCallFromStaticMethodError(string instanceMethod, string staticMethod, Location location)
36  : base(location) {
37  StringBuilder aux = new StringBuilder();
38  aux.AppendFormat("The instance method '{0}' has been called from the static method '{1}', whithout using an object. ",
39  instanceMethod, staticMethod);
40  this.Description = aux.ToString();
41  }
42 
43  #endregion
44  }
45 }
46 
InstanceMethodCallFromStaticMethodError(string instanceMethod, string staticMethod, Location location)
Constructor
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Definition: Location.cs:24
Represents a error produced when an instance method is called from a static one, whithout using an ob...
System.Text.StringBuilder StringBuilder
Definition: CSharpParser.cs:4
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23