Halogen fluoride, i.g., a substance (such as ClF, ClF3, BrF, BrF3, IF, and IF3) represented by formula XFn (where X denotes halogen other than fluorine and n is an integer) is known as an etching gas for a material containing mainly silicon, molybdenum or tungsten.