|
Two problems: One your class declaration for ConnectionInfromation is misspelled and contains inconsistent naming conventions. Use camelCase or PascalCase but not both.
Two declaring an array only allocates the memory. You need a for loop to assign each block in the array to a new instance of ConnectionInformation. Ala
ConnectionInformation[] connections= new ConnectionInformation[10];
for(int i=0;i<connections.Length;i++){
connections[i] = new ConnectionInformation();
}
File Not Found
|
|
|
|
|
Did you mean that i should write the declaration like:
ConnectionInformation[] Connections= new ConnectionInformation[10];
or like :
connectionInformation[] connections= new ConnectionInformation[10];
i'm new at programming, and i didn't know about naming conventions, and i just finish
reading about them in MSDN.
thanks alot.
|
|
|
|
|
I think he meant that you should use a consistent naming scheme. In the code snippet of your initial post one field started with an uppercase letter and one started with a lowercase letter. This is inconsistent. If I recall right the naming conventions given in the docs suggest that public fields start with an uppercase letter.
By the way, it is not recommendable to make fields publicly accessible as done in your initial post. Instead you should declare them as private fields and make them accessible through properties.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Class names should be in PascalCase
Member names should be in camelCase (with the additional caveat of never have public members)
Property names should be camelCasePascalCase [oops ]
Variable names should be camelCase
Parameter names should be camelCase
If you don't agree with my above guidelines that is fine so long as you are CONSISTENT. That is one of the first signs you are maturing as a developer, the ability to be consistently wrong :p
-- modified at 17:24 Tuesday 13th February, 2007
File Not Found
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Property names should be camelCase
Bzzt. Property and method names should be PascalCase if you want your code to feel familiar to any .NET developer.
|
|
|
|
|
Read my caveat. Only public members should be in PascalCase and public members should never be used. Thus members should be in camelCase since all members should be protected or private.
Sorry, your right, I made a typo and then misread your reply.
File Not Found
|
|
|
|
|
I need to know how to read computer name in C# to a label
Thanks
|
|
|
|
|
Attach the ear adapter to the label and then speak slowly into your microphone.
Sorry, couldn't resist. How bout some code as an apology
myLabel.Text = System.Environment.MachineName
File Not Found
|
|
|
|
|
Soryy but is not ok, because myLabel.Text = System.Environment.MachineName read server name
And i need to read client name.
If sommbody can help me pls
|
|
|
|
|
Is in the requirements statement. You never mentioned anything about wanting a connected clients computer name. Connected clients are not required to have a machine name.
Of the top of my head I do not know .NET method to get the machine name from an IP Address however you could spawn netstat and resolve it.
File Not Found
|
|
|
|
|
use
lable.Text=System.Enviornment.MachineName;
Regards,
Wasif Ehsan.
|
|
|
|
|
i have an application which plays media files on the desktop using a maximized forum .
im trying to find a way to make sure that the media palyer forum is the lowest forum below all other windows i heard a way to do this last year using rundll32 or shell32 i cant rember can anyone help me out ?
|
|
|
|
|
SetWindowPos is the API that lets you also change the z-order.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I need set de sambaNTpassword in LDAP. Using a program in c#. I know the nt password is a MD4 hash. I use a MD4 class but de hash is diferent then a samba hash . For example:
password =pass
using MD4.cs = 52E9E9E4F1CD6D1ABC78AA866D2A5509
using samba = 8846F7EAEE8FB117AD06BDD830B7586C
anyone have one idea for help-me?
thanks
Seidl
-- modified at 13:40 Tuesday 13th February, 2007
|
|
|
|
|
Folks,
In one of my requirement I have to use ADODB(since I need
old method recordset)in c#.I am trying to execute stored proc I don't know how to pass parameters from c# to adodb can anyone help me.
rs=cmd.execute(out object recordsaffected,ref object parameters,int options)
can somebody help me how to pass ref object parameters with some sample.
Thanks
kingston
|
|
|
|
|
hi,
How do we notify the application about alerts in the database.
Actually i have created an alert in the database and it gets called whenever an update occurs in the database.how does the application gets to know that an alert has been called?the database is SQL Server 2000 and im using c#.
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
Do you mean a trigger ? You can't.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Not triggers actually.You have "sp_add_alert" like http://msdn2.microsoft.com/en-us/library/aa259587(SQL.80).aspx
by this you can create a database alert .I just wana know how to notify the alert to the application.
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
Hi,
I am having problem finding a dot net solution (i.e. dll or namespace) for using the ODMA.
If any1 has a solution for using ODMA on .net platform please help me out.
Thank you!
M. Nauman
|
|
|
|
|
Hello,
I am currently using C# and DirectShow to create a DVD Playback. I am using DirectShow DVD Navigator/Splitter Filter to read the DVD stream directly from a DVD disc and produces individual media type outputs, such as audio, video, and subpicture.
I was wondering if there is way to get the name of the DVD and from this filter and display it on the User Interface? After all, once the DVD is placed on the DVD-Driver, the name of the movie appears on the driver.
Thank you for your help and any information to get this problem solved
Khoramdin
|
|
|
|
|
I spent a several lifetimes by searching how to implement nice folder tree in C#. A tree which looks like that in Windows Explorer.
There are several solutions that are complicated, platform-dependent and full of errors. What I need is to implement a tree usable on different platforms only with minimum modifications (it will show "Desktop" and "Network Places" on Win32, but can be simply modified to work well on Linux or Mac with Mono).
Of course, there is FolderBrowserDialog but this is a dialog and I need a control that can be docked inside a form and throws several events (directory changed etc.)
Any help would be appreciated.
|
|
|
|
|
Hi All,
You can set an application icon in the "Application" page of the project properties in visual studio. This works.
I can use the same icon for my filetype, assigned through the following registry key and value:-
HKEY_CLASSES_ROOT\MyFile\DefaultIcon\[default value] = c:\mypath\myexe.exe,0
Which uses the 0th icon in my app for the file type icon. But how can I add another icon embedded to the exe to use instead? Back in the VC6 / c++ days this was easy. the icons would of course end up being c:\mypath\myexe.exe,1
Many windows binary images have multiple icons in. How to implement this in c#?
Thanks
Jon
|
|
|
|
|
I would use a PNL package [Probabilistic Network Library in http://sourceforge.net/projects/openpnl[^]], but this package was in .cpp an .hpp, please help me to introduce this package in my project,
i work with C# .net VS2005, i don't know if the Visual Studio 2005 introduce .cpp an .hpp
thank you.
-- modified at 11:02 Tuesday 13th February, 2007
|
|
|
|
|
You can't mix languages. You can write a dll in managed C++, which uses these files, and uses a managed class to expose their methods to C#.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I wonder how many times that answer has been given to a question in this forum.. Just the last few days I know I have read it several times, and then I haven't even read all threads.. Is it really so that people doesn't read the first post, search articles here, and do not use google like ever??
Internet - the worlds biggest dictionary
|
|
|
|