I am using Sharp develop. I am making a windows form application using C#. In this application i am using a webbrowser control. I want that When i open a webpage My webbrowser should programatically copy the source code of that webpage to a text file. I am using the following code to do this task
string MSDNpage1 = webBrowser1.Document.Body.InnerText;
cxz.My.MyProject.Computer.FileSystem.WriteAllText("F:\\Assignment.txt", MSDNpage1, true);
But this is giving an error as
” The type or namespace Name “My” doesnot exist in the namespace cxz(are u missing assembly refrence?)( CS0234)”
The
Mykeyword exists in VB.Net not C#. Here is the code to write text to a file in C#:Ref: Code: Writing to a Text File Visual C#