Click here to Skip to main content
15,892,965 members
Home / Discussions / C#
   

C#

 
GeneralArray of bitmaps. Pin
AKXman14-Apr-08 10:39
AKXman14-Apr-08 10:39 
GeneralRe: Array of bitmaps. Pin
Christian Graus14-Apr-08 11:16
protectorChristian Graus14-Apr-08 11:16 
GeneralRe: Array of bitmaps. Pin
AKXman14-Apr-08 12:05
AKXman14-Apr-08 12:05 
GeneralRe: Array of bitmaps. Pin
Christian Graus14-Apr-08 12:10
protectorChristian Graus14-Apr-08 12:10 
GeneralRe: Array of bitmaps. Pin
Luc Pattyn14-Apr-08 12:38
sitebuilderLuc Pattyn14-Apr-08 12:38 
GeneralRe: Array of bitmaps. Pin
AKXman15-Apr-08 12:52
AKXman15-Apr-08 12:52 
GeneralRe: Array of bitmaps. Pin
Luc Pattyn15-Apr-08 13:12
sitebuilderLuc Pattyn15-Apr-08 13:12 
GeneralSerialize this OBJECT! Pin
zaboboa14-Apr-08 10:06
zaboboa14-Apr-08 10:06 
Hi
Can any one provide me with help on how to serialize this collection of objects? I was trying to put some tags, but I am not really getting anywhere.

<br />
[XmlRoot ()]<br />
public class TableList<br />
{<br />
	private ArrayList tableList;<br />
<br />
	public TableList()<br />
	{<br />
		tableList = new ArrayList();<br />
	}<br />
<br />
	[XmlArray("tables")]<br />
	public MyTableItem[] Tables<br />
	{<br />
		get<br />
		{<br />
			MyTableItem[] tables = new MyTableItem [tableList.Count];<br />
			tableList.CopyTo(tables);<br />
			return tables;<br />
		}			<br />
	}<br />
<br />
	public int AddTable(MyTableItem table)<br />
	{<br />
		return tableList.Add(table);<br />
	}<br />
	<br />
<br />
	public class MyTableItem<br />
	{<br />
		TableInfo TableInfo = new TableInfo();<br />
		<br />
		[XmlElement("name")]<br />
		public string TableName = string.Empty;<br />
		[XmlElement("id")]<br />
		public string OasisID = string.Empty;<br />
		[XmlElement("Info")]<br />
		public Object TableInformation = new Object();<br />
		<br />
		public MyTableItem ()<br />
		{<br />
		<br />
		}<br />
<br />
		public MyTableItem (string Name, string OasisID)<br />
	    {<br />
			this.TableName = Name;<br />
			this.OasisID = OasisID;<br />
	        TableInformation = TableInfo.GetTableInformation(Name);<br />
	    }<br />
	}<br />
	<br />
	public class TableInfo<br />
	{<br />
		public TableInfo ()<br />
		{<br />
			<br />
		}<br />
		<br />
		public Object GetTableInformation (string tableName)<br />
		{<br />
			if (tableName == "Table1")<br />
			{<br />
				Table1 tb1 = new Table1();<br />
				return tb1;<br />
			}<br />
			<br />
			if (tableName == "Table2")<br />
			{<br />
				Table2 tb2 = new Table2();<br />
				return tb2;<br />
			}<br />
			return null;	<br />
		}<br />
	}<br />
	<br />
	public class Table1<br />
	{<br />
		[XmlAttribute()]<br />
		public string Prop = "Hello";<br />
		<br />
		public Table1()<br />
		{<br />
		<br />
		}<br />
	}<br />
	<br />
	public class Table2<br />
	{<br />
		[XmlAttribute()]<br />
		public string WhatIsThis = "Test string";<br />
		<br />
		public Table2()<br />
		{<br />
		<br />
		}<br />
	}<br />


Thank you very much!
GeneralRe: Serialize this OBJECT! Pin
Zoltan Balazs14-Apr-08 10:37
Zoltan Balazs14-Apr-08 10:37 
QuestionHow to show a new record, and not the first (Windows Forms) Pin
Alessandra7714-Apr-08 9:56
Alessandra7714-Apr-08 9:56 
GeneralRe: How to show a new record, and not the first (Windows Forms) Pin
Expert Coming14-Apr-08 13:04
Expert Coming14-Apr-08 13:04 
GeneralFindNext on BindingSource Pin
jchalfant14-Apr-08 8:56
jchalfant14-Apr-08 8:56 
AnswerRe: FindNext on BindingSource Pin
jchalfant14-Apr-08 10:45
jchalfant14-Apr-08 10:45 
QuestionUnboxing Question Pin
jka34714-Apr-08 8:39
jka34714-Apr-08 8:39 
GeneralRe: Unboxing Question Pin
Pete O'Hanlon14-Apr-08 9:10
mvePete O'Hanlon14-Apr-08 9:10 
GeneralRe: Unboxing Question Pin
jka34714-Apr-08 9:23
jka34714-Apr-08 9:23 
GeneralRe: Unboxing Question Pin
PIEBALDconsult14-Apr-08 17:29
mvePIEBALDconsult14-Apr-08 17:29 
GeneralSystem.NullException Error Pin
tcombs0714-Apr-08 8:26
tcombs0714-Apr-08 8:26 
GeneralRe: System.NullException Error Pin
Luc Pattyn14-Apr-08 9:01
sitebuilderLuc Pattyn14-Apr-08 9:01 
GeneralRe: System.NullException Error Pin
tcombs0714-Apr-08 9:29
tcombs0714-Apr-08 9:29 
GeneralRe: System.NullException Error Pin
Luc Pattyn14-Apr-08 9:56
sitebuilderLuc Pattyn14-Apr-08 9:56 
GeneralSQL statement Pin
vanessa12314-Apr-08 8:08
vanessa12314-Apr-08 8:08 
GeneralRe: SQL statement Pin
Rob Philpott14-Apr-08 8:18
Rob Philpott14-Apr-08 8:18 
GeneralRe: SQL statement Pin
Rob Philpott14-Apr-08 8:19
Rob Philpott14-Apr-08 8:19 
GeneralSerializing object. Need Help. Pin
zaboboa14-Apr-08 6:33
zaboboa14-Apr-08 6:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.