Click or drag to resize
ContactInfoExtensionsIsInContactGroup Method
Indicates whether contact is present in contact group on contact's site.

Namespace: CMS.ContactManagement
Assembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 10.0.0
Syntax
C#
public static bool IsInContactGroup(
	this ContactInfo contact,
	string contactGroupName
)

Parameters

contact
Type: CMS.ContactManagementContactInfo
Contact whose presence in contact group is checked.
contactGroupName
Type: SystemString
Name of contact group.

Return Value

Type: Boolean
True if contact is present in the specified group. Otherwise returns false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ContactInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when contact is null.
ArgumentExceptionThrown when contactGroupName is null or empty string.
See Also