Ado.net命名约定和标准 [英] Ado.net naming convention and standards

查看:72
本文介绍了Ado.net命名约定和标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要适当的命名约定和此代码的标准。

提前感谢。

i need proper naming convention and standards for this code.
thanks in advance.

public void updateProjectData(ProjectsEvent message)
        {
            

            MySqlConnection update_connection = new MySqlConnection("server=localhost;database=my_project;port=3306;uid=root;password=;AutoEnlist=false");

            try
            {
                string sql = "UPDATE  `my_project`.`projekte` SET  `desc` =  '"+message.prj_description+"' WHERE  `projekte`.`ID` ="+message.RecordID+";";
                //sqlQuery2 = "update projekte set desc = '"+ message.prj_description.ToString()+"' where ID = " + message.RecordID + "";

                update_connection.Open();
                MySqlCommand command1 = new MySqlCommand(sql, update_connection);
                command1.ExecuteNonQuery();
                update_connection.Close();

            }
            catch (Exception e)
            {
                throw e;

            }
        }

推荐答案

这取决于你。您是否浏览过任何命名约定文件



其他关注并学习...

1. < a href =http://en.wikipedia.org/wiki/Naming_convention_(programming)#.NET> .NET [ ^ ]

2. [MSDN]命名指南 [ ^ ]

3. C# - 命名标准 [ ^ ]

4. .NET / C#项目的命名约定 [ ^ ]

5. C#中的命名约定 [ ^ ]
It depends upon you. Have you gone through any Naming Convention Document?

Else follow and learn...
1. .NET[^]
2. [MSDN] Naming Guidelines[^]
3. C# - Naming Standards[^]
4. Naming Conventions for .NET / C# Projects[^]
5. Naming Convention in C#[^]


通过阅读命名对话和标准来尝试自己。因为每次都没有人去纠正你的代码。所以最好学习然后应用你的代码。



这里有更好的链接来理解命名的标准和标准: -

http://www.dofactory.com/reference/csharp-coding-standards.aspx [ ^ ]

c#中的命名标准 [ ^ ]

C#的编码标准:名称 [ ^ ]
try yourself by reading naming convension and standards. because each time no one going to correct your code. so better learn and then apply on your code.

here is better links to understand naming convension and standards:-
http://www.dofactory.com/reference/csharp-coding-standards.aspx[^]
Naming Standards in c#[^]
Coding Standards for C#: Names[^]


这篇关于Ado.net命名约定和标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆