System.Configuration.Assemblies.AssemblyHash Structure

Assembly: Mscorlib.dll
Namespace: System.Configuration.Assemblies
Summary
Represents a hash of an assembly manifest's contents.
C# Syntax:
[Serializable]
public struct AssemblyHash : ICloneable
Remarks
AssemblyHash values are used throughout the common language runtime to detect a change in assembly contents.
See also:
System.Configuration.Assemblies Namespace

System.Configuration.Assemblies.AssemblyHash Member List:

Public Constructors
ctor #1 Overloaded:
.ctor(byte[] value)

Initializes a new instance of the AssemblyHash structure with the specified hash value. The hash algorithm defaults to AssemblyHashAlgorithm.SHA1.
ctor #2 Overloaded:
.ctor(AssemblyHashAlgorithm algorithm, byte[] value)

Initializes a new instance of the AssemblyHash structure with the specified hash algorithm and the hash value.
Public Fields
Empty An empty AssemblyHash object.
Public Properties
Algorithm Read-write

Gets or sets the hash algorithm.
Public Methods
Clone
Equals
(inherited from System.ValueType)
See base class member description: System.ValueType.Equals


Indicates whether this instance and a specified object are equal.
GetHashCode
(inherited from System.ValueType)
See base class member description: System.ValueType.GetHashCode


Returns the hash code for this instance.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
GetValue Gets the hash value.
SetValue Sets the hash value.
ToString
(inherited from System.ValueType)
See base class member description: System.ValueType.ToString


Returns the fully qualified type name of this instance.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Configuration.Assemblies.AssemblyHash Member Details

Overloaded ctor #1
Summary
Initializes a new instance of the AssemblyHash structure with the specified hash value. The hash algorithm defaults to AssemblyHashAlgorithm.SHA1.
C# Syntax:
public AssemblyHash(
   byte[] value
);
Parameters:

value

The hash value.

Return to top


Overloaded ctor #2
Summary
Initializes a new instance of the AssemblyHash structure with the specified hash algorithm and the hash value.
C# Syntax:
public AssemblyHash(AssemblyHash(
   AssemblyHashAlgorithm algorithm,
   byte[] value
);
Parameters:

algorithm

The algorithm used to generate the hash. Values for this parameter come from the AssemblyHashAlgorithm enumeration.

value

The hash value.

Return to top


Field: Empty
Summary
An empty AssemblyHash object.
C# Syntax:
public static readonly AssemblyHash Empty;

Return to top


Property: Algorithm (read-write)
Summary
Gets or sets the hash algorithm.
C# Syntax:
public AssemblyHashAlgorithm Algorithm {get; set;}
Remarks
The hash is made up of a byte array and a value from a class of supported algorithm types.
See also:
AssemblyHashAlgorithm

Return to top


Method: Clone()
Summary
Clones this object.
C# Syntax:
public object Clone();
Return Value:
An exact copy of this object.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.ValueType.Equals

Summary
Indicates whether this instance and a specified object are equal.
C# Syntax:
public override bool Equals(
   object obj
);
Parameters:

obj

Another object to compare to.

Return Value:
true if obj and this instance are the same type and represent the same value; otherwise, false.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~AssemblyHash();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.ValueType.GetHashCode

Summary
Returns the hash code for this instance.
C# Syntax:
public override int GetHashCode();
Return Value:
A 32-bit signed integer that is the hash code for this instance.
Remarks
The ValueType.GetHashCode method applies to types derived from ValueType. One or more fields of the derived type is used to calculate the return value. If one or more of those fields contains a mutable value, the return value might be unpredictable, and unsuitable for use as a key in a hash table.

For more information, see Object.GetHashCode, and Hashtable.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetValue()
Summary
Gets the hash value.
C# Syntax:
public byte[] GetValue();
Return Value:
The hash value.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: SetValue(
   byte[] value
)
Summary
Sets the hash value.
C# Syntax:
public void SetValue(
   byte[] value
);
Parameters:

value

The hash value.

Return to top


Method: ToString()
Inherited
See base class member description: System.ValueType.ToString

Summary
Returns the fully qualified type name of this instance.
C# Syntax:
public override string ToString();
Return Value:
A String containing a fully qualified type name.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.