c# - FxCop - CA1034 error - WHY? -


After

I am running static code analysis with FxCop 1.36 and I keep getting: NestedTypesShouldNotBeVisible

I will assume that the original class was declared internal or private, but it is public << / P>

Am I missing something or is there anything that can be ignored? is?

Thanks for any input!

Here is a part of the code due to this warning:

  name space Company.App.Thing {Public Partial Category Page: XtraPage {Public Representative Zero TimerResetDelegate (Object Sender, EventArgs e); Private TimerSet Widget _timerReset; Public page () {InitializeComponent (); } Public TimerResetDelegate TimerReset {set {if (! Null = (_timerReset = value)) {checkBox.Click + = new eventhandler (_timerReset); TextField.Click + = new event here (_timerReset); TextField.KeyDown + = New KeyEventHandler (_timerReset); TimeField.Click + = new event handler (_timerReset); Timefield.Kaidown + = New Keyword Handler (_timerReset); Generally speaking, nested types are difficult to 'find' I  

e.g. To use your nested type, I have to write the following

  Timeline Reset Timer = New Page Timer Reset Account ();  

Although the above is a valid C # code, it does not read like a normal type of usage.

The nested type is commonly used when you want to define any kind of internal use and you will avoid the code as above, this is the reason that FxCop is warning you if If you want, you can ignore it. Personally, I keep my nested type as private if I expect the caller to use this type, then I will take them to the proper namespace.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -