Hi Syamala,
T4 won't help in this case. Ifyou have an already existing class and you want to add a method to it, while you can generete the body of the method with a T4 template you will need to write code to actually edit the existing file and properly adding the generated method to that existing class.
What you need to look for is VS's CodeModel, which you can use to get to an existing class, browse its methods, etc. Unfortunately, CodeModel doesn't support adding a method body, but at least, once you get there to the right class using Code Model you can edit the text buffer and add the new method as raw text.
I suggest you ping the Visual Studio Extensibility forum, right here on MSDN, to get more help on how to use CodeModel, etc.
thanks,
-vga.