if (attRef.IsMTextAttribute)
{
// This method sets the attRef.MTextAttribute.Contents correctly,
// but leaves the attRef.TextString empty so that nothing shows
// up for this attribute in the drawing.
attRef.TextString = "{\\fArial|b0|i0|c0|p82;Hello Swamp!}"
attRef.UpdateMTextAttribute();
// This does nothing at all.
attRef.MTextAttribute.Contents = "{\\fArial|b0|i0|c0|p82;Hello Swamp!}"
// This causes AutoCAD to crash.
mt.Contents = "{\\fArial|b0|i0|c0|p82;Hello Swamp!}";
attRef.MTextAttribute = mt;
}