BOISE, Idaho (

TheStreet

) --

Micron Technology

(MU) - Get Report

shares rose after hours after the semiconductor maker said it swung to a profit in its fiscal second quarter.

Micron earned $365 million, or 39 cents a share, in the quarter ended March 4; a year earlier it reported a loss of $763 million, or 99 cents a share.

Net sales in the quarter rose to $1.96 from $1 billion a year earlier.

"Micron positioned itself well during the recession. The company's results are starting to reflect the combination of an improving market, strong operational performance, advanced technology and a broad product portfolio," said Steve Appleton, Micron chairman and CEO, in a statement.

Micron shares rose 30 cents, or 2.9%, to $10.67 in after-hours trading Wednesday.

-- Reported by Joseph Woelfel in New York.

Follow TheStreet.com on

Twitter

and become a fan on

Facebook.