|
By navigating to that page. You can either run the website with F5, or you can attach the IDE debugger to the aspnet process.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello
i want to make an ocr in the .net... but can't find a dip dll around... plz if some one knows a link forward it to me
thanx
haseeb
|
|
|
|
|
I don't think there are any OCR solutions in .NET. It's a complex problem.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm writing a class that represent one connection ( with remote host) informations.
public class ConnectionInfromation
{
public Socket socket;
public int ConnectionStatus;
}
and then creating an array from that class, so every element in the array carry an
information for one connection
private ConnectionInfromation[] ConnInformations = new ConnectionInfromation[10];
but the poblem occur's when i try to assign an instance of Socket class to socket member
in ConnectionInfromation class
ConnInformations[0].socket = server.AcceptSocket();
the exception NullReferenceException is thrown with the comment(Object reference not set to an instance of an object )
what is the solution for this, how can i assign an instance for socket member in
ConnectionInfromation class.
|
|
|
|
|
Hussam Fattahi wrote: private ConnectionInfromation[] ConnInformations = new ConnectionInfromation[10];
This creates an array, but the items in the array, are all null. You need to call new on each item to create it, as in ConnInformations[0] = new ConnectionInfromation ( that's a typo in your code, BTW )
Why not use a list ? Must you have exactly 10 ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks alot, it works.
and for the 10, i was just testing the code.
and i was thinking about using an ArrayList.
|
|
|
|
|
If you're using C# 2005, you should never use arraylist, it's outdated crap. Use a generic List instead.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
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.
|
|
|
|