|
Hi,
can anybody help me in serialization of a ListDictoinary to XML, since it doesn't implement the ISerializable-Attribute I'm still searching the whole www to find ideas but no one seems to face this problem.
I need to reconstruct the Dictionary with its special attributes so i can't use a arraylist.
thx
|
|
|
|
|
Hi. I tryied to test dialog (windows form) inside MSVS C#, but Ctrl+T or "Format"/"Test dialog" functions were disabled. Could anybody tell me why? I noticed, that all items from the "Dialog editor" toolbox were disabled.
Thank you.
B.
|
|
|
|
|
Hi
i am working in c# with infragistics
In c# windows applicaion, I will be passing data from textbox..such that
for example:i havE 3 texboxes labeled
name:
age:
salary:....
Now name is the parent and age and salary r the child..so if i pass data in
the appropriate textbox..It should be added in the ultrawintree.......such that
name(parent) should show up on the root node of the tree. and age and
salary(child) should show up under the root node.
so now when I run this program, as it reads a xml schema and creates a xml file.. now when I clicked the ADD button, it checks for the xml file and each textbox
is binded to the xml elements..so that the data which is passed in the xml file willbe added in the xml..
now for example i gave john,22,1800 for name,age and salary respectively and again john,45,3800
so it should be shown in teh tree as follows tht john under john both ages and salary should be shown
ie like
parent(name) : john
child(age) : 22 45
child(salary): 1800 3800
but i am getting teh result as follows..
john
22
1800 and again
john
45
3800 seperately.... so please tell me how to do it.
here is my coding part
//FUNCTION FOR ADDINGNODES
private void AddNode(string ParentNAME, string AGE, string SALARY)
{
//add parent node
Infragistics.Win.UltraWinTree.UltraTreeNode parentNAMEnode = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode AGEnode = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode SALARYnode = new Infragistics.Win.UltraWinTree.UltraTreeNode();
//add parent node
parentNAME.Text = ParentNAME;
//other nodes
AGEnode.Text = AGE;
SALARYnode.Text = SALARY;
//add childnodes to parent
parentNAMEnode.Nodes.Add(AGEnode);
parentNAMEnode.Nodes.Add(SALARYnode);
parentNAMEnode.Expanded = true;
//add teh nodes to teh ultratree
ultraTree1.Nodes.Add(parentNAMEnode);
}
//ADD button
private void button1_Click(object sender, System.EventArgs e)
{
DataSet dataSet = new DataSet();
// Read the existing xml
dataSet.ReadXml("..\\..\\resultdata.xml");
//PARENTName TEXTBOX
string strParentNAME = txtParentNAME.Text;
//AGE Text box----int type
string strAGE = txtAGE.Text;
int intAGE;
if (!strAGE.Equals(string.Empty)) // check to make sure the user entered something
intAGE = Convert.ToInt32(strAGE);
//SALARY Text box----int type
string strSALARY = txtSALARY.Text;
int intSALARY;
if (!strSALARY.Equals(string.Empty)) // check to make sure the user entered something
intSALARY = Convert.ToInt32(strSALARY);
//create a new row
DataRow newrow;
newrow = dataSet.Tables[0].NewRow();
// add new row.
newrow["ParentNAME"] = strParentNAME;
newrow["AGE"] = strAGE;
newrow["SALARY"] = strSALARY;
AddNode(strParentNAME,strAGE,strSALARY);
//add the row to the dataset
dataSet.Tables[0].Rows.Add(newrow);
//write the data to a xml file
dataSet.WriteXml("..\\..\\resultdata.xml", XmlWriteMode.WriteSchema);
dataSet.AcceptChanges();
MessageBox.Show("Saved");
}
//form load
private void Form1_Load(object sender, System.EventArgs e)
{
DataSet dataSet = new DataSet();
//read the schema
dataSet.ReadXmlSchema("..\\..\\Menu.xsd");
dataSet.WriteXml("..\\..\\resultdata.xml",XmlWriteMode.WriteSchema);
}
please help me to do this
|
|
|
|
|
how do i embed or put an icon image in a binary file using C#????
|
|
|
|
|
Just a quick question. Is there an easy way to see if an object implements a particular interface? At the moment I am casting it and looking for an error Is there something like implements(object,interface) bool
Definitely a PEBCAK! (Problem Exists Between Keyboard And Chair) www.FruitBatInShades.com
|
|
|
|
|
object is interface
---
b { font-weight: normal; }
|
|
|
|
|
if(obj is ISomeInterface) or, if you have a list or something similar:
foreach(ISomeInterface i in myArray) { ... }
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Have you used or worked with ITextSharp, its a PDF manipulating component which I got off sourceforge, but it does not have extensive help/documentation and sourceforge does not have message boards and forums
|
|
|
|
|
|
Hi all ,
I need to disaplay a byte array within a datagrid
The array size could reach 500 bytes but I have only 16 COl in the grid
Is there a quick way to do this ?
Or should I run manualy on the grid and fill it ?
Thanks
|
|
|
|
|
I am using Datatable. I am getting DataType of the column but not SqlType.
|
|
|
|
|
Hiho
Are there good reasons available, to chose c# instead of vb?
Currently i know:
C#:
++
case sensitive
block-comments
cats
unmanaged code might be easier
closer to c++ / java syntax
arrays are defined in a proper way (elementCount instead of the index of the highest value)
unsigned datatypes
vb:
with
case insensitive (some guys think thats a benefit - im not so sure)
events might be easier
Is there some kind of in deep comparison available?
Maybe other reasons:
Member base of both languages might differ => but its rather hard to estimate both communities.
thx
Bernhard Neuhauser
|
|
|
|
|
I know for a fact that C# is more powerful and interfaces with all that the .NET framework offers, which VB .NET does not. If you're going to learn I new language, I would suggest C# since its used in industry extensively.
|
|
|
|
|
NewbieDude wrote: interfaces with all that the .NET framework offers
Really? That goes both ways.
For example, C# supports Unsafe code blocks, VB doesn't. VB supports optional parameters, C# doesn't.
It's just a matter of preference. They both target the .NET Framework quite well, each with it's own limitations.
I'd agree that learning C# would be very useful to him, but I'd also have to add that learning every language you can would be very useful to prospective employers even more so.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
> C# is more powerful
Are you able to give some Examples?
> If you're going to learn I new language,
> I would suggest C# since its used in industry extensively.
Sometimes its not so easy ;o)
I see 2 possibilities:
a) convince my boss that c# is better
b) convince myself that vb is as good or even better.
Thats the reason for my vb vs. c# comparison research.
thx
Bernhard
|
|
|
|
|
There are no absolute, water-proof and one-sided reasons for choosing C# over VB. As VB uses the same framework, anything you can do in C# you can also do in VB. For an example, the untyped datatypes that you mention is a part of the framework, so of course they are also available in VB.
It's more a matter of taste. The difference is how you do things, not what you can do. For an example the event handing is easier in VB, if by easier you mean less typing. If you want to be able to read in the code what happens, the C# way is easier.
BASIC (Beginners All-purpose Symbolic Instruction Code) was a simple interpreted language in the beginning. Many attempts have been made to make it compiled and object oriented, and perhaps VB is one of the best, but my opinion is that the language still suffers from it's history. C# on the other hand is a language that is compiled and object oriented right from the start.
---
b { font-weight: normal; }
-- modified at 8:55 Monday 30th January, 2006
|
|
|
|
|
hi to all,
i'm working with a c# win form application and an sql server database.
i'm making a query that returns data with xml format.
i get the result of the query in an xmlReader c# object
how can i open the xml reader in internet explorer, in other word how can i put these date into internet explorer
best regards and thanks in advance
fady
|
|
|
|
|
"Flatten" the Xml to a physical disk file and then "point" IE to that file; if you have Xml file types bound to IE, then you can use a ShellExecute command on that Xml file and it should open in IE.
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
-- modified at 11:36 Monday 30th January, 2006
|
|
|
|
|
Does anyone know of any known issues with Microsoft IE WebControls? We have
never used WebControls in our project and need to
know if any known security holes exist specific to IE WebControls.
|
|
|
|
|
Hi all,
I have just started working on SQL Server 2005
and am new to this so if anyone could guide me to
start with this.
Thanks
Pramod
|
|
|
|
|
|
|
Thanks for the link
Pramod
|
|
|
|
|
Hi Howzit,
I am used to VB .NET. When you type "private sub whatever" and press enter, it creates a nice little nice procedure, with an "end sub" and everything.
In C# when I type for e.g. "private static void whatever" and press enter, it does not automatically put in the braces, is this how C# works? I assumed it would put the braces in automatically? The same applies to typing for e.g. an "if (asdf=1)" statement and pressing enter, should it not put the braces in for me?
Maybe its a setting?
|
|
|
|
|
its all u have to do
sathy
|
|
|
|