I want change string variable value to martial intreface ?how can i do..?

I want change string variable value to martial intreface ???how can i do…??

There is no convert string to class. You need to compare you saved string to a set/array of materials and get the proper material for that ID. There is some variance here but it depends on your exact needs and where you data was from.