VbaModuleAttribute.Equals

Equals(VbaModuleAttribute)

Returns a value indicating whether this instance is equal to the specified VbaModuleAttribute object.

public bool Equals(VbaModuleAttribute other)
ParameterTypeDescription
otherVbaModuleAttributeThe specified VbaModuleAttribute object to compare with this instance.

Return Value

Returns true if this instance is equal to the specified VbaModuleAttribute object; otherwise, false.

Examples

Shows how to check VBA module attributes equality.

var project = new Project(DataDir + "VbaProject.mpp");
var module = project.VbaProject.Modules.ToList()[0];

var attribute1 = module.Attributes.ToList()[0];
var attribute2 = module.Attributes.ToList()[0];
Console.WriteLine("Module attribute 1 Key: {0}, Value: {1}", attribute1.Key, attribute1.Value);
Console.WriteLine("Module attribute 2 Key: {0}, Value: {1}", attribute2.Key, attribute2.Value);
Console.WriteLine("Are module attributes equal: " + attribute1.Equals(attribute2));

See Also


Equals(object)

Returns a value indicating whether this instance is equal to the specified VbaModuleAttribute object.

public override bool Equals(object obj)
ParameterTypeDescription
objObjectThe specified VbaModuleAttribute object to compare with this instance.

Return Value

Returns true if this instance is equal to the specified VbaModuleAttribute object; otherwise, false.

Examples

Shows how to check VBA module attributes equality.

var project = new Project(DataDir + "VbaProject.mpp");
var module = project.VbaProject.Modules.ToList()[0];

var attribute1 = module.Attributes.ToList()[0];
var attribute2 = module.Attributes.ToList()[0];
Console.WriteLine("Module attribute 1 Key: {0}, Value: {1}", attribute1.Key, attribute1.Value);
Console.WriteLine("Module attribute 2 Key: {0}, Value: {1}", attribute2.Key, attribute2.Value);
Console.WriteLine("Are module attributes equal: " + attribute1.Equals(attribute2));

See Also