/// <summary>
 /// Detach a profile from a managed entity.
 /// </summary>
 /// <param name="hostProfile">ManagedObjectReference</param>
 /// <param name="managedObjectReferences">ManagedObjectReference[]</param>
 private void DetachHostFromProfile(ManagedObjectReference hostProfile,
                                           ManagedObjectReference[] managedObjectReferences)
 {
     Console.WriteLine("------------------------");
     Console.WriteLine("* Detach Host From Profile");
     Console.WriteLine("------------------------");
     cb._connection._service.DissociateProfile(hostProfile, managedObjectReferences);
     Console.WriteLine("Detached Host : "
           + managedObjectReferences.GetValue(0) + " From Profile : "
           + hostProfile.Value);
 }
 /// <summary>
 /// Associate a profile with a managed entity. The created hostProfile is
 /// attached to a hostEntityMoref (ATTACH_HOST_ENTITY_NAME). We attach only
 ///one host to the host profile
 /// </summary>
 /// <param name="hostProfile">ManagedObjectReference</param>
 /// <param name="hMor">ManagedObjectReference[]</param>
 private void AttachProfileWithManagedEntity(ManagedObjectReference hostProfile,
     ManagedObjectReference[] hMor)
 {
     Console.WriteLine("------------------------");
     Console.WriteLine("* Associating Host Profile");
     Console.WriteLine("------------------------");
     cb._connection._service.AssociateProfile(hostProfile, hMor);
     Console.WriteLine("Associated " + hostProfile.Value + " with "
     + hMor.GetValue(0)); //How to get value at array position 0
 }