Click here to Skip to main content
15,885,955 members
Home / Discussions / C#
   

C#

 
GeneralRe: Data from Scanner to Database Pin
Dave Kreskowiak23-Sep-09 9:31
mveDave Kreskowiak23-Sep-09 9:31 
AnswerRe: Data from Scanner to Database Pin
Henry Minute23-Sep-09 6:58
Henry Minute23-Sep-09 6:58 
GeneralRe: Data from Scanner to Database Pin
Dambod23-Sep-09 7:17
Dambod23-Sep-09 7:17 
GeneralRe: Data from Scanner to Database Pin
Henry Minute23-Sep-09 8:31
Henry Minute23-Sep-09 8:31 
AnswerRe: Data from Scanner to Database Pin
cmk23-Sep-09 8:29
cmk23-Sep-09 8:29 
QuestionExcel Chart Secondary Axis Pin
Cwenee23-Sep-09 5:29
Cwenee23-Sep-09 5:29 
AnswerRe: Excel Chart Secondary Axis Pin
Qu Dong2-Sep-13 23:11
Qu Dong2-Sep-13 23:11 
QuestionXMLSerialization Pin
ahmedsamir23-Sep-09 3:21
ahmedsamir23-Sep-09 3:21 
Hi i have an error in the Deserialize operation can you help me to solve it.

// my employee class
  public class Employee
    {
        int id;
        string name;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public void Show()
        {
            Console.WriteLine("Employee ID is " + Id);
            Console.WriteLine("Employee name is " + Name);
        }
    }

// the Serialize
static void Main(string[] args)
        {
           
           Employee[] emp = new Employee[3];

            emp[0] = new Employee();
            emp[0].Id = 10;
            emp[0].Name = "x";

            emp[1] = new Employee();
            emp[1].Id = 20;
            emp[1].Name = "y";

            emp[2] = new Employee();
            emp[2].Id = 30;
            emp[2].Name = "x";

            FileStream fs = new FileStream("123.txt", FileMode.Create);

            XmlSerializer xs = new XmlSerializer(typeof(Employee[]));
            xs.Serialize(fs, emp);

            fs.Close();
        }

// the Deserialize
 static void Main(string[] args)
        {
           
            Employee[] emp = new Employee[3];

            FileStream fs = new FileStream("123.txt", FileMode.Open);
            XmlSerializer[] xs = new XmlSerializer[3];

            for (int i = 0; i < emp.Length; i++)
            {
                xs[i] = new XmlSerializer(typeof(Employee));
                emp[i] = new Employee();
                emp[i] = (Employee)xs[i].Deserialize(fs);
                emp[i].Show();
            }
}

AnswerRe: XMLSerialization Pin
stancrm23-Sep-09 3:40
stancrm23-Sep-09 3:40 
AnswerRe: XMLSerialization Pin
ahmedsamir23-Sep-09 13:07
ahmedsamir23-Sep-09 13:07 
QuestionDelete A and Prt Records from DNS Pin
caiena23-Sep-09 3:09
caiena23-Sep-09 3:09 
AnswerRe: Delete A and Prt Records from DNS Pin
Richard MacCutchan23-Sep-09 3:49
mveRichard MacCutchan23-Sep-09 3:49 
GeneralRe: Delete A and Prt Records from DNS Pin
caiena23-Sep-09 3:54
caiena23-Sep-09 3:54 
QuestionHow to make textbox mandatory on dropdown change Pin
NK723-Sep-09 2:57
NK723-Sep-09 2:57 
AnswerRe: How to make textbox mandatory on dropdown change Pin
Richard MacCutchan23-Sep-09 3:04
mveRichard MacCutchan23-Sep-09 3:04 
AnswerRe: How to make textbox mandatory on dropdown change Pin
rah_sin23-Sep-09 3:29
professionalrah_sin23-Sep-09 3:29 
GeneralRe: How to make textbox mandatory on dropdown change Pin
Henry Minute23-Sep-09 7:06
Henry Minute23-Sep-09 7:06 
QuestionAppropriate Database in C# Pin
Reza Shojaee23-Sep-09 2:20
Reza Shojaee23-Sep-09 2:20 
AnswerRe: Appropriate Database in C# Pin
Not Active23-Sep-09 2:30
mentorNot Active23-Sep-09 2:30 
AnswerRe: Appropriate Database in C# Pin
Eddy Vluggen23-Sep-09 2:53
professionalEddy Vluggen23-Sep-09 2:53 
QuestionProblem in Dataadapter, sometimes its working and sometimes its showing error pls help Pin
amaankhan23-Sep-09 2:16
amaankhan23-Sep-09 2:16 
AnswerRe: Problem in Dataadapter, sometimes its working and sometimes its showing error pls help Pin
nagendrathecoder23-Sep-09 2:22
nagendrathecoder23-Sep-09 2:22 
AnswerRe: Problem in Dataadapter, sometimes its working and sometimes its showing error pls help Pin
J4amieC23-Sep-09 3:34
J4amieC23-Sep-09 3:34 
AnswerRe: Problem in Dataadapter, sometimes its working and sometimes its showing error pls help Pin
PIEBALDconsult23-Sep-09 5:46
mvePIEBALDconsult23-Sep-09 5:46 
QuestionAccess Modifier Pin
hotthoughtguy23-Sep-09 0:55
hotthoughtguy23-Sep-09 0:55 

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.