How to disable a particular compiler warning for a particular file

后端 未结 3 1337
时光取名叫无心
时光取名叫无心 2021-01-17 09:16

Background

I\'m working on a small coding project that is going to be sold to other companies. I needed to create some documentation for it, so I decided to use S

3条回答
  •  感情败类
    2021-01-17 10:03

    A couple of possibilities spring to mind:

    1. Can you have another class that imports the auto-generated .cs file? The wrapping class has the pragma and just imports the autogenerated class.
    2. Write a perl script (or simple C# program) that is called as a build event after the file is generated and before the .cs files are compiled.

提交回复
热议问题