If i reset my iphone to factory setting will it be unlocked again?

I got an iphone on tmobile and i want to go on vodafone but i think my phone is locked so i thought that if i reset it to factory state that if would be unlocked again or will it still be locked to tmobile

Reset and factory lock are two different things. You will have to get the unlock code to have the phone 'let go' of Tmobile. Reset won't touch it. Best luck.

http://www.gazelle.com/thehorn/2014/01/29/unlock-phone-carrier/

No. IPhone will still be locked. You need to go your provider to unlocked or use some online service for unlocking like iMZDL.com

Factory settings will include being locked to the provider it was sold through

It will still be locked to t-mobile. If you reset it you will just erase all of your personal stuff and settings. Sorry