An oligoaniline compound represented by the formula: wherein each of R 1 to R 10 independently represents a hydrogen atom, halogen atom, hydroxyl group, amino group, silanol group, thiol group, carboxyl group, phosphate group, phosphoric acid ester group, ester group, thioester group, amide group, nitro group, monovalent hydrocarbon group, organoxy group, organoamino group, organosilyl group, organothio group, acyl group or sulfone group, m and n are independently integers of 1 or over provided that 4 ≤ m+n ≤ 20 is satisfied, and X represents a group represented by any of the following formulae to,,, and to: wherein R 1 to R 10 have the same meanings as defined above, each of R 21 to R 52 independently represents a hydrogen atom, hydroxyl group, amino group, silanol group, thiol group, carboxyl group, phosphate group, phosphoric acid ester group, ester group, thioester group, amide group, nitro group, monovalent hydrocarbon group, organoxy group, organoamino group, organosilyl group, organothio group, acyl group or sulfone group, p and q are independently integers of 1 or over provided that p ≤ 20 and q ≤ 20 are satisfied, each W 1 is independently selected from -(CR 1 R 2) p -, -O-, -S-, -S-S-, -S 2, -C -, C O-, -OC -, -C O-, -OC -, -C NR 1 -, -NR 1 C -, -O-(CR 1 R 2) p -O-, -C O-(CR 1 R 2) p -OC -O-Si(CR 1 R 2) 2 -O-, wherein R 1 and R 2 have the same meanings as defined above, a group represented by the following formula and a group represented by the following formula: wherein R 1 to R 5, p and q have the same meanings as defined above. each of R 1 to R 10 independently represents a hydrogen atom, halogen atom, hydroxyl group, amino group, silanol group, thiol group, carboxyl group, phosphate group, phosphoric acid ester group, ester group, thioester group, amide group, nitro group, monovalent hydrocarbon group, organoxy group, organoamino group, organosilyl group, organothio group, acyl group or sulfone group, m and n are independently integers of 1 or over provided that 4 ≤ m+n ≤ 20 is satisfied, and X represents a group represented by any of the following formulae to,,, and to: wherein R 1 to R 10 have the same meanings as defined above, each of R 21 to R 52 independently represents a hydrogen atom, hydroxyl group, amino group, silanol group, thiol group, carboxyl group, phosphate group, phosphoric acid ester group, ester group, thioester group, amide group, nitro group, monovalent hydrocarbon group, organoxy group, organoamino group, organosilyl group, organothio group, acyl group or sulfone group, p and q are independently integers of 1 or over provided that p ≤ 20 and q ≤ 20 are satisfied, each W 1 is independently selected from -(CR 1 R 2) p -, -O-, -S-, -S-S-, -S 2, -C -, C O-, -OC -, -C O-, -OC -, -C NR 1 -, -NR 1 C -, -O-(CR 1 R 2) p -O-, -C O-(CR 1 R 2) p -OC -O-Si(CR 1 R 2) 2 -O-, wherein R 1 and R 2 have the same meanings as defined above, a group represented by the following formula and a group represented by the following formula: wherein R 1 to R 5, p and q have the same meanings as defined above. R 1 to R 10 have the same meanings as defined above, each of R 21 to R 52 independently represents a hydrogen atom, hydroxyl group, amino group, silanol group, thiol group, carboxyl group, phosphate group, phosphoric acid ester group, ester group, thioester group, amide group, nitro group, monovalent hydrocarbon group, organoxy group, organoamino group, organosilyl group, organothio group, acyl group or sulfone group, p and q are independently integers of 1 or over provided that p ≤ 20 and q ≤ 20 are satisfied, each W 1 is independently selected from -(CR 1 R 2) p -, -O-, -S-, -S-S-, -S 2, -C -, C O-, -OC -, -C O-, -OC -, -C NR 1 -, -NR 1 C -, -O-(CR 1 R 2) p -O-, -C O-(CR 1 R 2) p -OC -O-Si(CR 1 R 2) 2 -O-, wherein R 1 and R 2 have the same meanings as defined above, a group represented by the following formula and a group represented by the following formula: wherein R 1 to R 5, p and q have the same meanings as defined above.