سؤال

لدي وظيفة اعتقدت أنني قمت بإصلاح تحذير CA2000 في تحليل التعليمات البرمجية، لكنه لن يذهب بعيدا.التحذير على SQLCommand.ها هي الوظيفة: giveacodicetagpre.

لدي وظيفة أخرى لا يبدو لي أن لا يختلف ولكن ليس لديك تحذير CA2000 المرتبط به.إليك هذه الوظيفة: giveacodicetagpre.

أنا لا أفهم ما يحدث هنا وما أحتاج إلى القيام به لإصلاحه.

هل كانت مفيدة؟

المحلول

The CA2000 warning is notorious for causing false positives. One of the things it does is when it finds more than 16 possible locations that can throw an exception, it just stops looking and flags the CA warning.

A very similar question with a response from Microsoft can be found here: http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/90f993a3-6bdf-4b62-9982-9247a655406d/

Connect bug tracking this issue: https://connect.microsoft.com/VisualStudio/feedback/details/725836/warning-ca2000-is-fired-on-a-sqlcommand-with-many-sqlparameters#details

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top