Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need proper naming convention and standards for this code.
thanks in advance.
C#
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;

            }
        }
Posted
Updated 13-Jan-14 18:46pm
v2

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#[^]
 
Share this answer
 
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900