.NET Framework - Nomenclatura
Asked By Alfredo
17-Nov-09 12:32 PM
Hola,
Existe algun estandar de nomeclaturas para vb.net
como por ejemplo:
a variables:
intenger -> intMiValor
string -> strValor
Double -> dblValor
...
Las clases -> cMiClase, cOtraClase
parĂ¡metros -> pValor
Objetos: oMiObjeto
Etc
Gracias.
System.Data.SqlClient
(1)
Visual Studio
(1)
EventHandler
(1)
EventArgs
(1)
ADO.NET
(1)
Attribute
(1)
IntMiValor
(1)
COtraClase
(1)
Alberto Poblacion replied to Alfredo

Esto se hac?a en los entornos de programaci?n antiguos para poder
distinguir de un vistazo el tipo de cada variable. En la actualidad ha ca?do
en desuso, porque el entorno de trabajo (Visual Studio) es lo
suficientemente inteligente para darte las caracter?sticas de cada
identificador con solo parar el rat?n encima, as? que ya no se sigue
aconsejando poner un prefijo en las variables para indicar el tipo o el
alcance.
Solo hay unas cuantas convenciones que tienen m?s que ver con el uso de
una variable que con su tipo. Me vienen a la mente las siguientes:
- Los nombres de las interfaces empiezan por I.
- Los nombres de atributos terminan en Attribute.
- Los nombres de las Excepciones terminan en Exception.
- Los nombres de los delegados que se usan para declarar eventos terminan
en EventHandler.
- El segundo argumento de los eventos es de una clase cuyo nombre termina
en EventArgs.
- Los objetos de ADO.NET que dependen de un proveedor concreto llevan un
prefijo que depende del proveedor. Por ejemplo, los objetos de
System.Data.SqlClient empiezan todos por Sql.
Jhonny Vargas P. replied to Alfredo
Hola Alfredo,
Esas son normas que debes establecer tu mismo o que te debe proveer el
departamento de inform?tica, para llevar a cabo un mejor entendimiento y
control sobre el c?digo fuente.
Como te se?ala Alberto, estas nomenclaturas ya no suelen usarse mucho, pero
te insisto dentro de una organizaci?n existen normas que van desde la
nomenclatura hasta las buenas pr?cticas del uso de controles y c?digo
fuente... tanto en el IDE, como en Base de Datos, arquitectura, etc..
Sino las tienes.. las deber?as ir creando de apoco, esto se nace seg?n la
experiencia propiamente tal, dificilmente encuentres alg?n documento que
hable de esto, sin embargo existe mucha informaci?n en el sitio de Microsoft
sobre Buenas Pr?cticas.
http://msdn.microsoft.com/en-us/practices/bb973206.aspx
--
Saludos,
Jhonny Vargas P.
Santiago de Chile
located in the web site If I use the built-in development web server in Visual Studio it works just fine. If I instead use IIS and the asp engine aspnet_wp.exe behind file public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {} } Here is the source. Inherits = "_Default" %> all Digital cameras and camCorders for sale < / h3 failure in starting the process for the user instance. The connection will be closed. Undantagsinformation: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to a failure in a failure in starting the process for the user instance. The connection will be closed.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj
XP pro with a Sql Server express 2005 database. I have also Sql Server Management Studio Express Here is what I have done * ** ** ** ** ** ** ** ** ** I have created a file system web site that this form will be implemanted later. So If I run the web application from visual studio I works fine. If I now start Internet explorer and enter this url http: / / localhost it causes error Login failed for user 'HEMPC \ ASPNET' I can use Sql Server Management Studio Express to attach to the database located at F: \ NORTHWIND \ APP_DATA \ ASPNETDB.MDF. Have anyone error and where in the code it occured can be found in the stacktrace. Exceptioninformation: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed. Login failed for user 'HEMPC \ ASPNET'. SourceError SqlException (0x80131904): Cannot open user default database. Login failed. Login failed for user 'HEMPC \ ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
How do I best fix this error .NET Framework I have tried with Visual Studio 2010 Proffessional and Visual Web developer express 2010 but I get the following error when I try to run for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file G: \ ASP Module 3 name exists, or specified file cannot be opened, or it is located on UNC share.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5064458 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System
more views and a table. When I run the view on the SQL Server Management Studio, it runs for 2 seconds. Most of the time when the view is run from out here This is the stack of where the view timed out in the program: System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler
and best regards Frank Uray private static bool StopThread = false; private void Form1_Load(object sender, EventArgs e) { System.Threading.Thread local_Thread = new System.Threading.Thread(RunThread); local_Thread.Start(); System.Windows.Forms Form local_Form = new System.Windows.Forms.Form(); local_Form.MdiParent = this; local_Form.Show(); } private void RunThread() { System.Data.SqlClient.SqlConnection local_SqlConnection = new System.Data.SqlClient.SqlConnection(); System.Data.SqlClient.SqlCommand local_SqlCommand = new System.Data.SqlClient.SqlCommand(); System.Data.SqlClient.SqlDataReader local_SqlDataReader; local_SqlConnection