FileAssociation/AssociationManager.cs
/// <summary>
/// Determines of the list of extensions are associated with the specified program id.
/// </summary>
/// <param name="progId">Program id to check against.</param>
/// <param name="extensions">String array of extensions to check against the program id.</param>
/// <returns>String array of extensions that were not associated with the program id.</returns>
Determines of the list of extensions are associated with the specified program id.
Determines of the list of extensions are associated with the specified program id .
public string[] CheckAssociation(string progId, params string[] extensions)
      {
         List<string> notAssociated = new List<string>();
         foreach (string s in extensions)
         {
            FileAssociationInfo fai = new FileAssociationInfo(s);
            if (!fai.Exists || fai.ProgID != progId)
               notAssociated.Add(s);
         }
         return notAssociated.ToArray();
      }
public string [ ] CheckAssociation ( string progId , params string [ ] extensions ) { List < string > notAssociated = new List < string > ( ) ; foreach ( string s in extensions ) { FileAssociationInfo fai = new FileAssociationInfo ( s ) ; if ( ! fai . Exists || fai . ProgID != progId ) notAssociated . Add ( s ) ; } return notAssociated . ToArray ( ) ; }
Determines of the list of extensions are associated with the specified program id.
Determines of the list of extensions are associated with the specified program id .
String array of extensions that were not associated with the program id.
String array of extensions that were not associated with the program id .
progId
string
Program id to check against.
Program id to check against .
extensions
String array of extensions to check against the program id.
String array of extensions to check against the program id .