Object Naming Without Hungarian?

Apr 5, 2010

Mostly because of reading this site, I'm trying to move away from Hungarian Notation. Or I guess the improper (system) Hungarian.

I can figure out a better way to name most data types, but I don't know what to do with objects. What would be a good naming convention for objects? I use objRS for recordsets now.

View 3 Replies


ADVERTISEMENT

Object Naming Through Code

Jul 27, 2011

I am creating the pictureboxes through code in VB, and I am trying to give them instance names through code, since they do not exist in the forms physically (I cannot manually name each one), only when I run my application (using VB 2008 express). The pictures work, they are displayed when I run the application but I need to find a way to be able to call each one because I need to create motion animation for every separate picture object.

[Code]...

View 2 Replies

C# - Naming Convention For Interface Implementator's Object?

Sep 16, 2010

What is the most commonly used convention (in C# and VB) to name object, when I want to emphesize that it is an instance of class that implements some interface. Like here:

//is iDisp correct name?
protected void Dispose(IDisposable iDisp)
{
iDisp.Dispose();
Console.WriteLine("Disposed");
}

View 4 Replies

Hungarian Notation In .NET?

May 17, 2011

Our programming teacher taught us to use the Hungarian notation (e.g. intMyInteger, strMyString,...) while programming.But I have heard somewhere this isn't actually used in the professional world. Is this true?

Edit: I just found out this is actually "Leszynski"

View 5 Replies

.net - Asc(Chr(254)) Returns 116 In .Net 1.1 When Language Is Hungarian?

Oct 5, 2009

I set the culture to Hungarian language, and Chr() seems to be broken.

System.Threading.Thread.CurrentThread.CurrentCulture = "hu-US"
System.Threading.Thread.CurrentThread.CurrentUICulture = "hu-US"
Chr(254)

This returns "ţ" when it should be "þ" However, Asc("ţ") returns 116. This: Asc(Chr(254)) returns 116.Why would Asc() and Chr() be different?I checked and the 'wide' functions do work correctly: ascw(chrw(254)) = 254

View 3 Replies

What To Use For Naming Conventions

Mar 25, 2011

What everyone uses for naming conventions?

View 3 Replies

Dynamic Naming Of Label

Feb 21, 2012

I'm a beginner in visual basic programming.I want to make login form in vb and i want that after signing in,another form opens with message "Welcome (User name)".This user name will be given at run time. So i just want a guidance in how to implement this thing in vb.

View 1 Replies

IDE :: Re-naming/re-using A Windows Service?

Oct 18, 2011

I've created a VB.NET2010 stub service application with a bunch of common features that I'd like to be able to use repeatedly as the starting point for various more specialized projects.

For each spin-off project I want to be able to start with the stub and then rename the service "completely", so that each instance behaves as if it was created from scratch with its own unique name.

I've tried the steps below with limited success; the re-named service builds as wanted/needed, BUT it won't run because I can't add the new service name to the StartupObject pulldown list.

Change ServiceInstaller.ServiceName from stubName to newSvceName.

View 2 Replies

Naming The Text Editor?

Mar 5, 2009

how when i open my text editor that in the blue area at the top it displays "untitled" but when a file is saved it shows in blue the new title name.im using vb2008?

View 7 Replies

.net - Naming Standard For Generics - Of T Or Of TEntity?

Mar 16, 2011

I know this is a stupid question maybe, but what is the naming standard for generics?Of t or Of TEntity or Of..it doesn't really matter?I see IQueryable(Of T) but then DBSet(Of TEntity).

View 3 Replies

C# - Implement Column Self-naming From Its Index?

Mar 1, 2011

I wish to be able to instantiate my Cell class while naming the cell instance with such name as "A", "B", "C", etc. just like in an Excel spreadsheet.

I have my Cell class like so:

public class Cell {
public Cell(Range nativeCell) {
NativeCell = nativeCell;

[Code].....

I would need to generate a name based on the alphabetic letters and double and triple them once I encounter the last alphabet letter 'Z'. The algorithm would have to generate the letters that I would concatenate with the rowIndex value that would result to this naming strategy such as Excel.

The letters would be:

A, B, C, D...Z, AA, AB, AC...AZ, BA, BB, BC...BZ, CA...XAA, XAB, XAC...

While we clearly know that colIndex value 1 will definitely designate column "A", value 2 = "B", value 3 = "C", etc.

My problem is particularly when we double the letters.

how I could achieve this in the simplest possible form?

View 2 Replies

Constructor Variable Naming Convention?

Jan 25, 2012

I have a class (let's call it foo) that has several public properties.

private _fee as object
private _fie as object
private _fo as object

[Code]....

So far this seems to work... I'm just worried that something might get screwed up scope wise.

What is the normal way someone would name the constructor variables in a class like this?

View 9 Replies

Correctly Naming Variables/controls?

Sep 1, 2010

Can some one please be kind enough to link me m$ naming guide lines.

View 2 Replies

Dynamic Variable Naming At Runtime?

Oct 30, 2009

I am trying to create a number of objects depending on the width of a row of an array, is there a way I can change the name of the variable being Dim 'd as I don't know how wide the array will be.

I have been trying something along the lines of:

pseudocode
For x as integer = 0 to UBound(MyArray,2)
Dim Object & CStr(x) As Object Type
Next

View 3 Replies

Naming Conventions - Name Member Variables In .NET?

Jun 9, 2010

I am generally not one to engage in subjective arguments over matters like variable naming, code formatting, etc. So I have no intention of starting an argument here.I just came across this (old) blog post which recommends not prefixing member variable names:

[Code]...

I get it: member variables can be lower camelCase, and public properties/methods can be PascalCase. But VB.NET is case-insensitive, so you can't really give a private member the same name as a public property except with a lower case first letter.I've generally prefixed member variables with an underscore, but I've been told that's not idiomatic.

So really I'm just curious: how do you name your member variables in VB.NET? And is there a "standard" way?

I'm not asking because I believe there's a "right" way or because I particularly want to change my style, and certainly not because I have any desire to tell others they're "wrong." Like I said, I'm just curious.

View 7 Replies

Naming For Namespace / Class And Variables

Jul 7, 2009

In the code below, the namespace is called "Navigation" which I think is correct. Then I have a class called "Heading", which by definition is the direction a person/vehicle is truly pointing towards. I think that is also named correctly. In the code below, I have four things I have named:
_WhatToName1, WhatToName2, WhatToName3, and WhatToName4.
The value that gets passed in and stored is a double between 0 and 360 -- essentially the degree value from a circle. For WhatToName3 and WhatToName4, I have seen a lot of places that just use "value" as the name. Is that standard?

Namespace Navigation
Public Class Heading
Private _WhatToName1 As Double
Public Sub New(ByVal WhatToName3 As Double)
Me.WhatToName2 = WhatToName3
[Code] .....

View 18 Replies

Slow IDE - Faster Way Of Naming Controls?

Sep 21, 2010

I have experienced this in both VB 2005 and 2008. First, design a form by placing your UI elements where you want them. Then, go back and start naming your controls the way you want them (i.e. "txtWhatever" instead of the default "TextBox1", etc.).I find that after you change the name of a control, there is a slight but annoying delay as VS IDE digests the fact that you changed the name, thus slowing down my workflow. I recall that this process was much more rapid-fire in the VB6 days - i.e. name one control, click the next one and start typing, boom-boom-boom.

Has this annoyed anyone else, and if so, have you found any kind of remedy to speed things up in this regard?

View 8 Replies

VS 2008 Naming Standards For Constants?

Feb 24, 2010

Are there any naming standards for constants that are different than variables? ex: Const for the prefix of the name.

View 3 Replies

VS 2010 DataGridView Naming In Runtime?

Jan 7, 2011

I'm creating an application that allows the user to create their own queries based on criteria in various list boxes and my idea was to produce the results of the SQL in a "new" DGV, which in turn will be created in a "new" TabPage in a separate form . Each time the user runs a query a new DGV and TabPage is created. I've named each "new" DGV based on a user textbox so each "new" DGV will be named differently. The problem is how do I reference each new DGV? At the moment I get-"the value of type 'Syst.cannot be converted to string"It allows me to name the DGV with a string, but not reference it!

Any ideas how I reference a DGV when its created in runtime.

[Code]...

View 2 Replies

VS 2010 Form Naming Standards?

Jun 6, 2011

have a form that is used to enter employee information and I also have a class object that I use to validate data and pass employee information around. What are the proper names for the form and the class?

View 9 Replies

Class Private/Public Naming Conventions?

Mar 25, 2011

I'm relatively new to .NET and am wondering how people handle naming their private variables and the public properties that access them. Like if you want to be able to just read it, but not write to it.

[Code]...

So far I've taken to putting a 'l' (for local) in front of the all the private variables so as to be able to use the full name for the property. Is there a better way around this, or do you just always have to have different names for private variable/public properties? If so, what sort of conventions do people use?

Its not a huge deal, its just a minor annoyance and I was wondering if I was missing something.

View 4 Replies

FreeImageNET.dll Producing A Strong Naming Violation?

Apr 12, 2011

I am getting a strong naming violation for the dll file and really new to signing applications. How would I proceed in resolving this so that I can build the application I will be supporting? Also, as the FreeImage reference gets updated will I need to re-sign it?

View 9 Replies

Get The Universal Naming Convention In Visual Basic?

Jun 11, 2008

I am trying to convert visual basic 6 code to vb net. How do you in Visual basic .net get the universal naming convention.

View 8 Replies

Naming Convention For Variables In Class Constructor

Nov 26, 2010

In the past when I have written classes and constructors, I named the variables in the constructor parameter something different than what would have been stored in the actual class itself.What I do now is name them the same, and reference the internal variables with Me.varname.Here is a class I just started building.Is my naming convention incorrect? [code]

View 1 Replies

Referencing An Unbound DataGridView Without Specifically Naming It?

Mar 15, 2012

I am using 3 unbound DataGridView controls to display certain information. To load the information into those DGVs, I am pulling the information from an encrypted file, decrypting it, parsing the information, then trying to fill the DGVs with that information. The loading from the file is called by the menu item click. Here is what I have so far:

Private Sub miCLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles miCLoad.Click
Dim FilePath As String = "C:FListCList.clt"

[code].....

View 2 Replies

Visual Basic 6.0 To 2008 Naming Conventions?

Jan 5, 2011

iv got visual basic 6.0 and im trying to change the naming conventions because i need to change them to 2008 standards the code is for a basic book shop.im looking ofr the code for the calcualte button on a till.you enter the title,quantity and price.then it updates for extended price 15% discount and the discounted price. There is also a running total of no of books sold and the total no of dicount given in € the code is

[Code]...

View 5 Replies

VS 2008 Change Default Naming Of New Controls

Nov 24, 2011

I was just wondering is there a way to change the default name when you add a new control? I like to name my controls btnSomething etc... and if i could change the default names of added buttons from Button1, Button2 etc to btn1, btn2 etc.It will save me time when renaming.(Same applies for toolstripmenuitem buttons)Actually what would be ideal is if when i add a button, i directly go to the input for Text, and when i change that for the first time (like with toolstripmenuitems) the name changes according to the text (e.g. when you add a toolstripmenuitem in a context menu strip, if you set the text to "Reset" the name becomes ResetToolStripMenuItem. It would be awesome if i could make it automatically name to btnReset for buttons and tsmReset for toolstripmenuitems.)If there is a way to do this, even a difficult and not exactly pretty one involving macros and an input box, i would like to know

View 4 Replies

Write A Class Where A Property Can Be Accessed Without Naming It?

Mar 29, 2010

[code].....

View 1 Replies

[2005] Naming A Class Instance At RunTime?

Feb 9, 2009

I have a little banking console app for a class project. I've created a class (Account). What I want to do is name the instance of the class based on text input:

Dim strFoo As String
strFoo = Console.Readline
Dim strFoo as New Account

Obviously this won't work because strFoo is a String.

View 8 Replies

.net - Strong Naming An Assembly Using Command Line Compile

May 18, 2010

I am trying to use NAnt in order to compile and sign an assembly using the vbc compiler. I have a project set up and am able to successfully sign the assembly compiling with VS2010. When I try to sign it using the command line I get this error:

vbc : error BC30140: Error creating assembly manifest: Error signing assembly -- The parameter is incorrect.

I even created a trivially simple app (just an assemblyinfo.vb file) that will not compile and sign using vbc.exe What am I doing wrong?

here is my assemblyinfo.vb:

Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection

[Code]....

I have found that MSBuild also does not like having the AssemblyKeyFile attribute as I have defined it in the AssemblyInfo.vb, it gives the same failure message. So the only way I can currently get this to build correctly is to set properties on the project to tell it which key file to use and to sign the assembly.

The reason this appears to work building the project from within VS2010 is that msbuild is passing /keycontainer to vbc.exe on the command line instead of using /keyfile. Still don't know how to use the /keyfile command line parameter.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved