Click here to Skip to main content
15,867,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# need help reading XML config file with multiple values in windows forms app Pin
Gerry Schmitz12-Feb-18 6:13
mveGerry Schmitz12-Feb-18 6:13 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 6:22
Travis Jacobson12-Feb-18 6:22 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Gerry Schmitz12-Feb-18 6:35
mveGerry Schmitz12-Feb-18 6:35 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 7:27
Travis Jacobson12-Feb-18 7:27 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Gerry Schmitz12-Feb-18 7:36
mveGerry Schmitz12-Feb-18 7:36 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 7:57
Travis Jacobson12-Feb-18 7:57 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Gerry Schmitz12-Feb-18 8:03
mveGerry Schmitz12-Feb-18 8:03 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 8:43
Travis Jacobson12-Feb-18 8:43 
sorry, im not looking for you to write it for me. This code is for my own person application i am developing as i learn on my own. I am trying to self teach myself C#. I am not working on this for a school or business project.

I am reading over the class and trying to figure out how to include this in my method. Here is what i have so far. Can you at least show me where i might be going wrong? im trying to figure out how to use the variable i to link it to the class and grab the data. I haven't experimented much with custom built classes yet. i used the link you sent me as a template.

C#
public void XMLStrings(string filename)
      {
          // Create an instance of the XmlSerializer specifying type and namespace.
          XmlSerializer serializer = new
          XmlSerializer(typeof(XMLClass));

          // A FileStream is needed to read the XML document.
          FileStream fs = new FileStream(filename, FileMode.Open);
          XmlReader reader = XmlReader.Create(fs);

          // Declare an object variable of the type to be deserialized.
          XMLClass i;

          // Use the Deserialize method to restore the object's state.
          i = (XMLClass)serializer.Deserialize(reader);
          fs.Close();

          // Write out the properties of the object.
          textBox1.AppendText(
          i.something1 + "\t" +
          i.something2 + "\t" +
          i.something3);

      }

GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
J. Calhoun12-Feb-18 9:17
J. Calhoun12-Feb-18 9:17 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 10:29
Travis Jacobson12-Feb-18 10:29 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
J. Calhoun12-Feb-18 10:44
J. Calhoun12-Feb-18 10:44 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 10:55
Travis Jacobson12-Feb-18 10:55 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
J. Calhoun12-Feb-18 11:06
J. Calhoun12-Feb-18 11:06 
QuestionRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 11:46
Travis Jacobson12-Feb-18 11:46 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 11:48
Travis Jacobson12-Feb-18 11:48 
GeneralRe: C# need help reading XML config file with multiple values in windows forms app Pin
Travis Jacobson12-Feb-18 8:43
Travis Jacobson12-Feb-18 8:43 
AnswerRe: C# need help reading XML config file with multiple values in windows forms app Pin
Dave Kreskowiak12-Feb-18 11:43
mveDave Kreskowiak12-Feb-18 11:43 
QuestionUpdating textbox from derived class c# wpf Pin
Member 1357136412-Feb-18 3:44
Member 1357136412-Feb-18 3:44 
AnswerRe: Updating textbox from derived class c# wpf Pin
Richard MacCutchan12-Feb-18 6:10
mveRichard MacCutchan12-Feb-18 6:10 
AnswerRe: Updating textbox from derived class c# wpf Pin
Gerry Schmitz12-Feb-18 6:21
mveGerry Schmitz12-Feb-18 6:21 
GeneralRe: Updating textbox from derived class c# wpf Pin
Member 1357136412-Feb-18 20:54
Member 1357136412-Feb-18 20:54 
GeneralRe: Updating textbox from derived class c# wpf Pin
Gerry Schmitz13-Feb-18 5:10
mveGerry Schmitz13-Feb-18 5:10 
GeneralRe: Updating textbox from derived class c# wpf Pin
Member 1357136414-Feb-18 9:00
Member 1357136414-Feb-18 9:00 
GeneralRe: Updating textbox from derived class c# wpf Pin
Gerry Schmitz14-Feb-18 10:26
mveGerry Schmitz14-Feb-18 10:26 
QuestionPls Provide me business logic method for reset password or forget password by user id... Pin
Member 1367430012-Feb-18 3:02
Member 1367430012-Feb-18 3:02 

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.