DVTk API
AddAttribute Method (groupElementString, vr, list)
DVTkDvtkData.DimseAttributeSetAddAttribute(String, VR, array<Object>[]()[])
DVTk API

[This is preliminary documentation and is subject to change.]

Adds an Attribute to the AttributeSet.
Declaration Syntax
C#Visual BasicVisual C++
public int AddAttribute(
	string groupElementString,
	VR vr,
	params Object[] list
)
Public Function AddAttribute ( _
	groupElementString As String, _
	vr As VR, _
	ParamArray list As Object() _
) As Integer
public:
int AddAttribute(
	String^ groupElementString, 
	VR vr, 
	... array<Object^>^ list
)
Parameters
groupElementString (String)
The group element hex number for the newly created Attribute in hex string format
vr (VR)
The value representation for the newly created Attribute
list (array< Object >[]()[])
The list of values for the newly create Attribute
Return Value
The position into which the new Attribute was inserted.
Examples
This sample shows how to call the AddAttribute method.
CopyC#
AttributeSet attributeSet = new DataSet();
attributeSet.AddAttribute("0x12345678", VR.AE, "String0", "String1", "String2");
Exceptions
ExceptionCondition
InvalidCastException The list is an Object array. The items in this list are converted to the underlying vr as much as possible. However InvalidCastException may occur during these run-time conversions.

Assembly: DvtkData (Module: DvtkData) Version: 0.0.0.0