|
to convert object to byte[] look for a static method in the File class (not sure its name, it converts an object to bytes).
another thing, you can use SMTPclient object to send e-mail.
|
|
|
|
|
Hi
I have to add some functionality to a test harness. I have been given the whole solution which includes a web reference that contains classes ending in Wse. When i regenerate reference.cs (this file is generated from a schema related to the web service) it is correct according to the schema however the classes don't have wse functionality nor the Wse appended on to the end of the function name and so there are build errors functionNameWse does not exist in namepace...... as functionNameWse is autogenerated to functionName.
I am using VS2003 and it appears the WSE capability was generated previously using WSE 1.0 - no idea of the service pack though
Does any one know how i can correct this?
Thanks
Dan
|
|
|
|
|
Its ok i fixed this problem - for any one who may come against the same problem i used this tool: microsoft_wse_1.0_settings_tool - found it on google.
|
|
|
|
|
Hi Dear All Respected Programmers
I am having problem with following mentioned method when I try to write in C#. following mention method is belonged with VB6 kindly convert it into C#.
Thank you
dim strChecker as string
strChecker = "Z"
Text1.text = iif(strChecker="Z","Good","Bad")
|
|
|
|
|
M Riaz Bashir wrote: Text1.text = iif(strChecker="Z","Good","Bad")
Text1.Text = (strChecker == "Z") ? "Good" : "Bad";
Its called a Ternary operator I think. But don;t quote me on that!
|
|
|
|
|
J4amieC wrote:
Its called a Ternary operator I think. But don;t quote me on that!
That is correct. It's called a conditional or a ternary operator.
And you can quote me on that.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa, had a brain fart moment and couldnt think whether id made the name up or not...
|
|
|
|
|
Hi all,
I have posted a similar question before... I asked how i could trim a way the last character if it is a ",". And i got loads of ways, thanks.
Now i want to know how to trim away more than one character.
would it work, if i use one of the examples someone gave me, to do it like this...
strName[strName.Length-1] = string.Empty;
But if i make the "Length-1" part where the "-1" is the number of character i want to trim, would this be correct?
Thank you in advance
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Simplest solution I can think of is using SubString method:
strName.SubString(0, strName.Length - 4);
"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
|
|
|
|
|
thank you...
i used that example to get rid of one caracter aswell.
so am i understanding this right if i say that the "-4" or "-1" would be the amount of caracter to be left out from the end?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
NarutoFan#1 wrote: so am i understanding this right if i say that the "-4" or "-1" would be the amount of caracter to be left out from the end?
In case the first parameter (startIndex) equals 0, that's true.
"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
|
|
|
|
|
Okay, Great.
Thank you...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
NarutoFan#1 wrote: would it work, if i use one of the examples someone gave me, to do it like this...
strName[strName.Length-1] = string.Empty;
Who gave you that example? That is not even close to something that would work.
The indexer property of a string returns a character, so the value of strName[strName.Length-1] is a character value. The property is read only (as strings can not be changed), so you can not give the character a new value. Even if you could, you would not be able to change the length of the string, and you would not be able to put in a string in place of the character.
As you can not change a string, the only way to get a string with a different contents is to create a new string that contains what you want. The SubString method (as suggested by Stefan) does this. The Remove method can also be used:
strName = strName.Remove(strName.Lenght - 4, 4);
---
b { font-weight: normal; }
|
|
|
|
|
|
I see.
As lmoelleb already pointed out at the time, the code is utter nonsense.
The only scenario where this code might be the useful is if you deliberately want to produce a compiler error. Even then it's hardly the best code, as the same result can be obtained with much simpler code, e.g.:
char c = "";
---
b { font-weight: normal; }
|
|
|
|
|
LOL
So i won't even think of using that piece of code....
Thank yo for your help.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
I see you are the one who gave me this example, and this is the one i used...
so i suppose no harm done......
strNum = strNum.SubString(0, strNum.Length - 1);
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
hi all,
how can i create checkboxes dynamically in a C#.net2005 WEindows application..
Thanks in advance..
|
|
|
|
|
Create a CheckBox control and add it to the form.
---
b { font-weight: normal; }
|
|
|
|
|
<br />
<br />
CheckBox myBox = new CheckBox();<br />
<br />
myBox.Checked = true;<br />
<br />
myPanel.Controls.Add( myCheckBox );<br />
<br />
Regards
Malc
*********************************************
|
|
|
|
|
The example you were given is sort of right, but if you want to see the checkbox whre you want it, you need to set the Left, Top, Width and Height properties as well.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all,
I am working on DXF formats in c#.NET in windows applications.i was struck with reading data from dxf formats i.e.,importing data.how to import the data according to the requirement of the values....Plz help me ASAP.
advance in thanks,
cnr.
|
|
|
|
|
1. Search the net for a specification of the dxf format to learn how data are organized.
2. Choose an appropriate reader (binary, text, xml, ..) according to the way data are stored in dxf format.
3. Finally read the data with the chosen reader in a way the dxf format specification implies.
"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
|
|
|
|
|
Hi
i want to make a application just like setup wizard.
form are should be appear by a next click in a main form one by one .
but next button shold be static for all form
how can i do that
Plz tell me simple solution
Parshant
|
|
|
|
|
Hello
Instead of making a form for each step; make a single form for your wizard. Now in the design mode, make each page's controls -textboxes, comboboxes, listboxes, etc..- in a container such as Panel , or a GroupBox . Put all Panels on top of each other -It will be a bit of a miss in the design mode I know -, and hide them all except the first page. Under the panels make you next/back buttons to hide/show pages asd requested by the user.
Regards
|
|
|
|