A photoresist composition containing a polymer having silicon atoms and sulfonium salt units having the following formula (I): ##STR15## wherein n is a positive integer equal to 10 to 100 inclusive, k is 0 or a positive integer equal to 1 to 100 inclusive, a sum of n+k is a positive integer equal to 10 to 200 inclusive, a ratio of k/(n+k) is in a range of 0 to 0.9 inclusive, Y- is a counter ion se