|
Yes, but since foo(a) always calls foo(a,b,c), the compiler can simply inline every call to foo(a). When you call foo (a), it can push additional two parameters on stack and call foo (a,b,c) directly.
|
|
|
|
|
I have a XML file like this:
- <Quiz Id="1" Date="24.07.2003">
- <Question Text="Question Text 1" Choice="a">
<Answer>text a1</Answer>
<Answer>text b2</Answer>
<Answer>text c3</Answer>
<Answer>text d4</Answer>
</Question>
- <Question Text="Question Text 2" Choice="b">
<Answer>text a1</Answer>
<Answer>text b2</Answer>
<Answer>text c3</Answer>
<Answer>text d4</Answer>
</Question>
</Quiz>
I want to serialize and deserialize it into a class and from that class. So my class have should have some XmlElements and XmlAttribute, But I don't know what my class should look like?
I should have XmlElement name Question, but how can I define that some attributes are for Quiz node and some for Question,and don't know about Answer node too.Because It could be for item or 3 or...
Another question is that maybe I have 3 or 4 or only 1 Question node in my XML file so how should I deal with it in my class? When I serialize it what should I concern?
Any comment is appreciated.
<html><b><FONT face="Lucida Handwriting, Cursive">Mazy
No sig. available now.
<FONT></b></html>
|
|
|
|
|
declare the class something like
[ XmlRootAttribute( ElementName = "classname" ) ]
public class classname
and look up the class XmlSerializer
it would probably be best to store the answer in an array.
pseudonym67
Neural Dot Net Articles 1-11 Start Here[^]
|
|
|
|
|
It is possible to put a tooltip on a GDI+ figure? (on mouseOver)
The tooltip1.SetToolTip() method takes in a System.WindowsForms.Control, but there is no overload for a GDI drawing ?
|
|
|
|
|
1). Declare global variables ToolTip tt; and bool installed = true;
2). Initialize tt in constructor of the form: tt = new ToolTip()
3). Override OnMouseMove :
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
if (bounds.Contains(e.X, e.Y))
{
this.Cursor = Cursors.Hand;
if (installed)
{
tt.SetToolTip(this, "Hello, r9 :o)");
installed = false;
}
}
else
{
this.Cursor = Cursors.Default;
if (!installed)
{
tt.RemoveAll();
installed = true;
}
}
base.OnMouseEnter(e);
}
"...hasn't really been well accepted ... as the ratings tell us so far " - Nishant S
|
|
|
|
|
You are genius
With all your help, I am getting better and better at understanding GDI+.
Thanks
|
|
|
|
|
Do you code a control or you just draw shape on the form?
All code examples supposed to work for the shape drawn on the form.
If you want to use examples to code a control, you should make some changes (some lines are not necessary and some things should be coded in other way).
"...hasn't really been well accepted ... as the ratings tell us so far " - Nishant S
|
|
|
|
|
I have a pictureBox on my Form.
Then I use the graphics object from the PictureBox_paint event:
..
graphicsObj = e.Graphics;
..
|
|
|
|
|
how to add myButton into toolbar of VS.NET
Nho'c ti`
|
|
|
|
|
toolbar.Buttons.Add(new ToolBarButton());
toolbar is the name of your class instance.
Hope this helps.
jesse m
The Code Project Is Your Friend...
|
|
|
|
|
Is there any way to create supplemental image encoders/decoders for GDI+? I'm assuming there must be, but I really haven't seen anything on this, not even on MSDN.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
|
Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window.
I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll.
How do I get that library to appear in the .NET section of the Add reference window?
Thanks.
|
|
|
|
|
To add it to the .NET section of the Add Reference, you have to add it to the Global Assembly Cache after signing it with a strong name. But, you can always just browse for its file using the Assembly Browser tab (or whatever it's called in VS.NET).
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
The GAC and a strong name isn't the only solution*. You can also add the path to your library to the registry.
For example, I put all my libraries (and other's) in C:\Development\Third Party\bin\ , so I added the following key to the registry:
HKCU\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Third Party\
I then set the (Default) string value to the above path. You can use the HKLM hive instead, if you want the setting to apply to all users.
* In fact, according to the docs adding it to the GAC won't work anyway, because the Add Reference dialog is path-based and doesn't enumerate the GAC.
Derek Lakin.
Try the Code Store for instant integrated access to an online repository of .NET components.
The great thing about being a slayer: is kicking ass is comfort food. Buffy
Salamander Software Ltd.
|
|
|
|
|
you can also use the probing tag name inside the config file to locate its path
you can also copy the file to the apps directory
so many choices, I wouldnt put it into the GAC so early
|
|
|
|
|
|
add it to the GAC and it should. The reason is because vs did the regsvr32.exe for you. It hasnt changed just the options
|
|
|
|
|
sorry for this pathetically preliminary question..
how do i determine if the check box in a data grid column is checked or not ? any small code snippets would be greatly appreciated..
thanks
There are no failures; there are only extended learning opportunities.
|
|
|
|
|
I would give you code, but thats at work, I will try though. I had a similar problem earlier today. Hope this helps.
Do something like
if (checkbox.checked == true)
{
whatever it is you had wanted to do if it were true
}
|
|
|
|
|
Depends on where do you need to check the checkbox's value, for example, if you are trying to update a row in a datagrid in the OnUpdateCommand event handler, you would do something like this:
<br />
((CheckBox)e.Item.FindControl("SomeCheckBox")).Checked<br />
where SomeCheckBox is the ID of the CheckBox control, and e is DataGridCommandEventArgs argument of the OnUpdateCommand event handler.
Is this what you are looking for?
Rado
|
|
|
|
|
Hi!
I wrote a windows service in C# using the .net clases in VS.NET.
It worked fine up until now, when I receive a "Access Denied" error message when I try to install it. I`m using MSI for the installer and I`m running Windows XP SP1.
If you have any sugestions, please let me know.
Thank You!
|
|
|
|
|
My first thought is that the service is already running on the machine you're installing on.
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
No, I`ve uninstalled it before.
I`ve cleaned up the registry of any information regarding this service and it doesn`t exists on the HDD either. I`ve changed the product and upgrade code and still nothing. I have administrative rights, I even give miself rights to act as a part of the operating sistem .
The entry in the Application log is:
The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: FaxManagementServices -- Error 1001. Access is denied.<br />
, (NULL), (NULL), (NULL), (NULL), (NULL), (NULL).<br />
I`ve activated the security audit and apparenty there is not an authentication faliure during the install process.
|
|
|
|
|
Hey guys-girls,I have been looking to find a good huffman tree example but i cant seem to find a code example of one that is in a language i know (C#, i can kinda desipher C/C++, they are all in java that i have found). I have no problem understanding the logic of the huffman tree algorithm but my problem lies in visualizing how to code it into C#. i want to write it in C# to see if i can do it. does anyone know of a good example or have any of you coded on before in a high level object language. I can kinda do it...i just dont know how to build the actuall tree portion of the Algorithm, any examples on that would help too. Thanks alot.
Jesse M.
The Code Project Is Your Friend...
|
|
|
|