|
i understand i must creat a web reference in my app, and in the new web reference dialog box to find the web service in the local host.
|
|
|
|
|
Surely you have the WSDL? That's what will generate the proxy stub for you.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
Hi, i'd like to know if there is an Event for Disconnect
the idea is when the server had disconnected MY APP that acts as a client
will get the event and will handle it
THNKS
Have Fun
Never forget it
|
|
|
|
|
Hi,
I'm trying to create a string that contains 3 characters.. (0x1B,0x61,0xn)
The last character is a parameter n, which can be from 0 to 9.
One approach is:
byte param = 0x02;
byte[] arr = new byte[3];
arr[0] = 0x1B;
arr[1] = 0x61;
arr[2] = param;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
string str = enc.GetString(arr);
It works, but seems a bit cumbersome..
If parameter was allways i.e. 0x02 then asolution could be
string s2 = "\x1B\x61\x02";
If I just add like this:
string s2 = "\x1B\x61" + param (2);
Then the string's 3th value is 0x50 "2" instead of 2 (ascii value)
Anyone have any idea???
Thx in advance..
Søren
|
|
|
|
|
this might work...
private string getString(byte Val)
{
return string.Format("\x1B\x61{0}",(char)Val));
}
greets
m@u
|
|
|
|
|
Hi, are you sure you want a string? if it is not really text, you should stick to
the byte array. File operations, serial port operations, and the like take byte arrays too.
|
|
|
|
|
Hi all, I used the Visual Studio EventLogInstaller component to visually add an eventlog to my service. Everything goes fine, but the log is created with a few default parameters that I don't know how to override. I'm talking about the overflow policy and the start type (automatic instead than manual).
I thought to add an event handler for the event after install, the create an EventLog with my log name and then modifying those properties, but the installation fails and rollbacks because it cannot find that log (if I let the install completing by removing those lines, the log is created).
How can I specify those values during installation?
Thank you,
Alessandro
|
|
|
|
|
I have a windows application which uses many assemblies. When I build it, all the assemblies are stored in the same output directory where EXE will be created. Is there any way to change this ? Is it possible to have folders inside this output directory and keep dll's there ?
|
|
|
|
|
Hi everyone,
I'm not sure if this's the right place to post this question but I have a strange problem in creating an installer package, I keep getting this runtime error:
There is a problem with this windows installer package.
A program run as part of the setup did not finish as expected...
Please help
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Dont worry, it was a stupid mistake that doest even worth mentioning
Thanx buddy
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello experts,
I want to make my application more user friendly and interactive. So I decided to provide the outlook type control in side bar.
If you are go to properties of any .Net project then you will see a new type of Tab with Application, Build, Build Events etc. ]
Is it in build in .NET...?
Please help.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
There are several outlook style controls here, on codeproject. Use search and you will find them
|
|
|
|
|
Hi,
i checked two checkbox in datagridview rows and want to capture the state of checkboxes..
kirankumar
|
|
|
|
|
bool blisChecked = yourCheckBox.Checked; ?
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
T will be some value type int, float, double, etc...
public T Mean<t>(T[] vec) where T : ???????
{
T tmp = 0; <--- error
foreach (T v in vec)
tmp += v; <--- error
return tmp / vec.Length; <--- error
}
Are they so complex compared to C++
chesnokov
|
|
|
|
|
Sad but true: there is (not yet) a INumber or IArithmetic interface for this.
So either you have to use reflection to query the operators or you have to define a Interface yourself.
With .net 3.5 you can use the extension-method system to add the implementation for your interface to double/int/etc. so maybe this is the best way.
|
|
|
|
|
try this :
<br />
public T Mean(T[] vec) where T : Int32,Double,Fload,.....<br />
{<br />
tmp = default(T);
foreach (T v in vec)<br />
tmp += v; <br />
return (tmp / vec.Length) as T;
}<br />
Hope that helped
Nassos
"Success is the ability to go from one failure to another with no loss of enthusiasm."
Winston Churchill
"Quality means doing it right when no one is looking."
Henry Ford
|
|
|
|
|
I am using socket class for udp connection. I have to receive data from server but i do not know the size of data. In receive method we have to send byte array. Is there any way i can know how much bytes are available to read so that i can make an array of bytes for that size?
|
|
|
|
|
Received data should be in Byte Array right ? the you can ask byteArray.Length
|
|
|
|
|
in fact i am asking how can i know how much data is available to read so that i can make that much long byte array and send it as an argument in receive method of socket.
|
|
|
|
|
Well, i assume that you are using Asynchronous Socket
SocketPacket socketData = (SocketPacket)asyn.AsyncState; // where asyn is type of IAsyncResult
int iSizeofDatainSocket = socketData.m_currentSocket.EndReceive(asyn);
|
|
|
|
|
Sorry i forget to mention i am using synchronous. I understand your code. But how can this be done in synchronous. Here is my code snippet:
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);<br />
IPEndPoint end = new IPEndPoint(IPAddress.Any, 0);<br />
sock.Bind(end);<br />
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 3000);<br />
sock.Connect(this.GSIP, this.GSPort);<br />
<br />
byte[] bufferRec = new byte[65000];<br />
<br />
sock.Receive(bufferRec);<br />
|
|
|
|
|
Sorry i thought you are using Sync.
Please look at the highlighted stuff...
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
IPEndPoint end = new IPEndPoint(IPAddress.Any, 0);
sock.Bind(end);
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 3000);
sock.Connect(this.GSIP, this.GSPort);
int iTotalAvailableData = sock.Available;
//that size i am unable to know
byte[] bufferRec = new byte[iTotalAvailableData];
sock.Receive(bufferRec);
Thanks.
|
|
|
|
|
hello all,
In C# .NET how can i get ASCII value of a particular char and also how can i get a ASCII char from a ASCII value. such that for 65 it should return 'A'.
Please Reply.
Thank you
Dipak
|
|
|
|