Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ValueType.cs « System « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 733491f38b0a6bb7626bc8d05b5b003cbe79dca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// System.ValueType.cs
//
// Author:
//   Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc.  http://www.ximian.com
//

using System.Runtime.CompilerServices;

namespace System {

	[Serializable]
	public abstract class ValueType {

		// <summary>
		//   ValueType constructor
		// </summary>
		protected ValueType ()
		{
		}

		// <summary>
		//   True if this instance and o represent the same type
		//   and have the same value.
		// </summary>
		[MethodImplAttribute(MethodImplOptions.InternalCall)]
		public extern override bool Equals (object o);

		// <summary>
		//   Gets a hashcode for this value type using the
		//   bits in the structure
		// </summary>
		[MethodImplAttribute(MethodImplOptions.InternalCall)]
		public extern override int GetHashCode ();

		// <summary>
		//   Stringified representation of this ValueType.
		//   Must be overriden for better results, by default
		//   it just returns the Type name.
		// </summary>
		public override string ToString ()
		{
			return GetType().FullName;
		}
	}
}