I have written code for a C# console application. It copies a clipboard value to a file, and it runs without any error.
Now I want to use it in another C# project with other code.
I use [STAThread]
after class{}
, but it give me an error:
:: Attribute 'STAThread' is not valid on this declaration type. It is only valid on 'method' declarations.
What can I do?