I executed this applicaiton in CLR Application in Visual Studio 2008 amd it worked .But I want to implement this code on Windows Form Application,and it gave error like these on Form Application:
This isn't answering your question, but do you realise that your indexing calculation is incorrect? Your matrix should remember its dimensions for a start.
Also the destructor shouldn't use the scalar delete, as you allocated an array.