Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the function of the LockItem attribute in appSettings in App.Config file?

Tags:

c#

c#-4.0

<add key="MaxAllowed" value="90" lockItem="false"/>

There is a item called lockItem in my config file? MSDN states that "Gets or sets a value indicating whether the element is locked."

What does this mean? Does it mean that if set to true, the configuration won't be changed by editing the config file?

like image 341
user1890098 Avatar asked Feb 12 '15 07:02

user1890098


1 Answers

Yes, you are correct. The lockitem prevents modification for that node or any child node, if you have nested nodes. There is also LockAllAttributesExcept if you want to lock certain attibutes and not others.

like image 142
Luke Farnell Avatar answered Oct 15 '22 02:10

Luke Farnell