How to assign value to class member C#

I have defined this member in my Model class as such:

        public static bool StackTraceWanted { get; private set; }

I know what to assign it the value of true or false in another portion of the code

            Model.StackTraceWanted = true;

This does not work. How to I assign it a value?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you can only assign a value in the Model class itself and would just reference it as StackTraceWanted not Model.StackTraceWanted.

if you want to be able to assign out side of the model class then take away the private key word in the setter.
AndyAinscowFreelance programmer / ConsultantCommented:
You have explicitly coded it so it is impossible to set the value from somewhere else.  Change your code to
 public static bool StackTraceWanted { get; set; }

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shoot, didn't see the static
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

käµfm³d 👽Commented:
You have explicitly coded it so it is impossible to set the value from somewhere else.
Somewhere outside the class, that is.
AndyAinscowFreelance programmer / ConsultantCommented:
Yes, but as the current code didn't work it implies it is outside the class
rwheeler23Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.