Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
QuestionProblem connecting a network drive in C# through windows service Pin
Praveen Raghuvanshi14-Jun-09 0:52
professionalPraveen Raghuvanshi14-Jun-09 0:52 
AnswerRe: Problem connecting a network drive in C# through windows service Pin
Dave Kreskowiak14-Jun-09 5:07
mveDave Kreskowiak14-Jun-09 5:07 
QuestionBlueTooth Pin
ellllllllie14-Jun-09 0:36
ellllllllie14-Jun-09 0:36 
AnswerRe: BlueTooth Pin
Henry Minute14-Jun-09 1:07
Henry Minute14-Jun-09 1:07 
GeneralRe: BlueTooth Pin
ellllllllie14-Jun-09 1:33
ellllllllie14-Jun-09 1:33 
AnswerRe: BlueTooth Pin
dan!sh 14-Jun-09 18:14
professional dan!sh 14-Jun-09 18:14 
Questionwhat does a adobe acrobat plugin does while displaying PDF file in IE? Pin
svt gdwl14-Jun-09 0:11
svt gdwl14-Jun-09 0:11 
QuestionI am having some problems serializing an object... [modified] Pin
Member 408659613-Jun-09 23:39
Member 408659613-Jun-09 23:39 
Hi i have a class called testparams:

[Serializable()]
  public class TestParams {


      public TestParams() {

          }

      private string m_filename;

      [EditorAttribute(typeof(FileNameEditor), typeof(UITypeEditor))]

      public string FileName {
          get { return m_filename; }
          set { m_filename = value; }
          }

      }


i use propertygrid and select the object :

TestParams TP = new TestParams();
propertygrid.SelectedObject  = TP;


serialization :
private void Save(TestParams obj) {

           XmlSerializer xs = new XmlSerializer(typeof(TestParams));
           using (FileStream fs = new FileStream(Directory.GetCurrentDirectory() + "\\testparams.xml", FileMode.OpenOrCreate)) {


               xs.Serialize(fs, obj);
               }
           }
       }


The problem:
if the user selects the file with the "..." button and i try to serialize TP to xml nothing get written in the file !

when user writes his text freely the xml file is written correctly .


any help will be appreciated

shay

modified on Sunday, June 14, 2009 6:28 AM

AnswerRe: I am having some problems serializing an object... Pin
Dave Kreskowiak14-Jun-09 5:04
mveDave Kreskowiak14-Jun-09 5:04 
Questionabout BitVector32 Pin
Seraph_summer13-Jun-09 23:23
Seraph_summer13-Jun-09 23:23 
AnswerRe: about BitVector32 Pin
Henry Minute13-Jun-09 23:41
Henry Minute13-Jun-09 23:41 
AnswerRe: about BitVector32 Pin
Guffa13-Jun-09 23:46
Guffa13-Jun-09 23:46 
QuestionQuestion For List Generics Pin
Sider8913-Jun-09 22:54
Sider8913-Jun-09 22:54 
AnswerRe: Question For List Generics Pin
0x3c013-Jun-09 23:22
0x3c013-Jun-09 23:22 
GeneralRe: Question For List Generics Pin
Sider8913-Jun-09 23:36
Sider8913-Jun-09 23:36 
GeneralRe: Question For List Generics Pin
0x3c014-Jun-09 0:57
0x3c014-Jun-09 0:57 
GeneralRe: Question For List Generics Pin
Sider8914-Jun-09 1:04
Sider8914-Jun-09 1:04 
GeneralRe: Question For List Generics Pin
0x3c014-Jun-09 1:36
0x3c014-Jun-09 1:36 
GeneralRe: Question For List Generics Pin
Sider8914-Jun-09 5:30
Sider8914-Jun-09 5:30 
GeneralRe: Question For List Generics Pin
0x3c014-Jun-09 5:47
0x3c014-Jun-09 5:47 
GeneralRe: Question For List Generics Pin
Sider8914-Jun-09 19:39
Sider8914-Jun-09 19:39 
QuestionClosing and recreating a form Pin
SimpleData13-Jun-09 22:43
SimpleData13-Jun-09 22:43 
AnswerRe: Closing and recreating a form Pin
Henry Minute14-Jun-09 0:14
Henry Minute14-Jun-09 0:14 
GeneralRe: Closing and recreating a form Pin
SimpleData14-Jun-09 0:15
SimpleData14-Jun-09 0:15 
GeneralRe: Closing and recreating a form Pin
Henry Minute14-Jun-09 0:31
Henry Minute14-Jun-09 0:31 

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.