|
Hi,
I've class, Node, with the following properties and these are the attributes of XML element.
XmlAttribute("id")]
public string Id
{
get { return m_id; }
set { m_id = value; }
}
[XmlAttribute("char")]
public string Char
{
get { return m_ch; }
set { m_ch = value; }
}
When this is serialized, it created the xml elements as below
<Node char="_" id="S_SEPARATOR">
<Node char="" id="S_BLANK">
The requirement is, if id is "S_BLANK", it shouldn't show "char" attribute, as below.
<Node char="_" id="S_SEPARATOR">
<Node id="S_BLANK">
Please guide me to get this output. Thanks in advance.
|
|
|
|
|
Hi,
you can use the ShouldSerialize* pattern
where * is the property name that's supposed to be serialized
public bool ShouldSerializeChar() {
return !"S_BLANK".Equals(id);
}
Cheers
Manfred
|
|
|
|
|
Thanks for your reply. Where should I call ShouldSerializeChar()?
|
|
|
|
|
This function is not meant to be called by you.
It's called by the XML serializer. If the serializer
sees a property with say an XMLAttribute it knows
it should serialize it. Then it checks if there is
a method bool ShouldSerialize(Property name here).
If it finds such a method the serializer calls it
and uses the return value to determine wether it
will really serialize this attribute or not.
Best Regards,
Manfred
|
|
|
|
|
Thank you, Manfred.. Thanks alot for detailed info..
|
|
|
|
|
Voting for a helpful answer is always appreciated.
|
|
|
|
|
Sorry.. forgot to vote.. Thank you for reminding me.
|
|
|
|
|
is there is any way to get text from image like in this photo
http://whomex.com/code.pngwhomex.com/code.png
http://whomex.com/code.pngwhomex.com/code1.png
http://whomex.com/code.pngwhomex.com/code2.png
http://whomex.com/code.pngwhomex.com/code3.png
http://whomex.com/code.pngwhomex.com/code4.png
http://whomex.com/code.pngwhomex.com/code5.png
http://whomex.com/code.pngwhomex.com/code6.png
http://whomex.com/code.pngwhomex.com/code7.png
Palestine
|
|
|
|
|
Don't post the same question in multiple places - all you will do is duplicate effort and annoy people.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
yes.
|
|
|
|
|
how i can do..
do you have example?
Palestine
|
|
|
|
|
Ooh goody. You want us to tell you how to avoid a site's CAPTCHA so that you can bombard it with crap. You aren't going to get help from anybody here with an ounce of ethics in them.
|
|
|
|
|
Oh pete, you disappoint me, you honestly think he is trying to bypass a captcha system? he only wants to know how to get the text from the image. what harm can be done.......
|
|
|
|
|
I know, it's just that I put on my extra cynical underpants this morning.
|
|
|
|
|
Pete O'Hanlon wrote: I put on my extra cynical underpants this morning
Wow, great minds think alike.
I put my ones on as well, except mine are thermal cynical underpants.
|
|
|
|
|
There's no way to help you bypassing captcha's protections. Sorry.
|
|
|
|
|
Yep... use a keyboard
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
The whole point behind a CAPTCHA is to keep automation code from using the system. Sorry, but we're not going to help you get past something that someone OBVIOUSLY doesn't want to getting past.
|
|
|
|
|
Dear Friends,
I want to wrap the text that i am entering into the notepad file being generated with the help of C#.Net2008, but not able to find any method, property for the same. Like if the entered text reaches the end of the screen visible to user (while maximize of a notepad) then the cursor moves to the next line.
Could any one help me in this regard?
Thanks
Varun Sareen
|
|
|
|
|
You need to write a CR and LF to the text at the point you want it to wrap.
If you want it to wrap at a point dependent on the width of the notepad window, then turn on WordWrap in notepad, and don't put any CRLF in your written output.
|
|
|
|
|
|
Hi
I want to load a Form in a Control Like PanelControl in c# Windows Form
in this way:
ContainerControl.Controls.Add(myForm)
can somebody help me?!!
I am using DevExpress10 and 4.0 framework
regards
Sepantanima
|
|
|
|
|
Change the Form to a UserControl and then you can host it.
|
|
|
|
|
thank for your help
but This Form is for a none objective mind Programmer that has been written in three years and is so heavy code to trace so i want a quickest way to use it in my Project Main Form
regards
|
|
|
|
|
you can add a Form to any kind of Container, such as a Panel; you do have to clear its TopLevel property before you can add it though.
|
|
|
|