Assign problem

I want send this data to serial port and assign this data to "MyData" variable.

What data? Are you referring to the string sent to the serial port? Why would you need to save that in an array? The data (the important data) is ALREADY in a variable (well, an array).