本文介绍了警告1 SA1201:CSharp.Ordering:所有方法必须放在所有字段之后。在stylecop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



完成我的项目检查 stylecop 中的代码。它给出了5个相同的警告:警告1 SA1201:CSharp.Ordering:必须放置所有方法在所有领域之后。如何删除此警告。请解决我的问题。我收到了我的代码

谢谢



问候,

Raju



Hi,
After complete my project check code in stylecop.It is given 5 warnings are same : Warning1SA1201 : CSharp.Ordering : All methods must be placed after all fields. how to remove this warnings.please solve my problem. i am attavhed my code
thank you

Regards,
Raju

// <copyright file="Form1.Designer.cs" company="Invensys">
//  Read Csv.
// </copyright>

namespace ReadCsv
{
      /// <summary>
        /// Required designer variable.
         /// </summary>
    public partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }

            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Btmrun = new System.Windows.Forms.Button();
            this.Btmexit = new System.Windows.Forms.Button();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // Btmrun
            // 
            this.Btmrun.Location = new System.Drawing.Point(163, 296);
            this.Btmrun.Name = "Btmrun";
            this.Btmrun.Size = new System.Drawing.Size(75, 24);
            this.Btmrun.TabIndex = 0;
            this.Btmrun.Text = "button1";
            this.Btmrun.UseVisualStyleBackColor = true;
            this.Btmrun.Click += new System.EventHandler(this.Btmrun_Click);
            // 
            // Btmexit
            // 
            this.Btmexit.Location = new System.Drawing.Point(350, 311);
            this.Btmexit.Name = "Btmexit";
            this.Btmexit.Size = new System.Drawing.Size(75, 23);
            this.Btmexit.TabIndex = 3;
            this.Btmexit.Text = "Exit";
            this.Btmexit.UseVisualStyleBackColor = true;
            this.Btmexit.Click += new System.EventHandler(this.Btmexit_Click);
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(138, 89);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 20);
            this.textBox1.TabIndex = 1;
            // 
            // textBox2
            // 
            this.textBox2.Location = new System.Drawing.Point(12, 139);
            this.textBox2.Multiline = true;
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(470, 140);
            this.textBox2.TabIndex = 2;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(483, 413);
            this.Controls.Add(this.Btmexit);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.Btmrun);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        // In this area given warning.......
        private System.Windows.Forms.Button Btmrun;
        private System.Windows.Forms.Button Btmexit;
        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
        private System.Windows.Forms.TextBox textBox1; 
        private System.Windows.Forms.TextBox textBox2;
     
        #endregion 
    }
}

推荐答案



这篇关于警告1 SA1201:CSharp.Ordering:所有方法必须放在所有字段之后。在stylecop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 22:31