ArguementOutOfRangeException when my application opens xml files in storage card

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a ArguementOutOfRangeException when my application opens xml files in storage card but there is no error when the xml files is in Program files. But I prefer to save all xml files in storage card so it won't lost if there is no battery. How can I handle this issue?
 
Kempton said:
I have a ArguementOutOfRangeException when my application opens xml
files in storage card but there is no error when the xml files is in
Program files. But I prefer to save all xml files in storage card so
it won't lost if there is no battery. How can I handle this issue?

Well, what does your code look like?
 
Chris Tacke said:
*That* is getting bookmarked!

I got fed up with typing out short descriptions of what I meant. Any
suggestions on improving it are more than welcome, by the way.

Next task: modify my newsreader so I can assign a hotkey which puts the
URL and introductory paragraph into a post at the touch of a button...
I wonder why I've never got round to that before?
 
The code

textreader = New XmlTextReader(startpath
While textreader.Rea
If textreader.NodeType = XmlNodeType.Element The
valType = textreader.Nam
ElseIf textreader.NodeType = XmlNodeType.Text The
Select Case valTyp
Case "Time
dateStr = textreader.Valu
rad.setRadTime(StringToDate(dateStr)
Case "Radiation
rad.setRadiation(textreader.Value
Case "AlarmLevel
rad.setAlarmLevel(textreader.Value
radData.Add(rad
rad = New RadDataClas
End Selec
End I
End Whil

where the startpath is gotten by

Public Function getDataDirPath() As Strin
'create the data directory inside the app's dir if not exis
'return the pat
Dim curDir As String = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase) & "/Data/
Dim f As Fil
Dim d As Director
If f.Exists(curDir) = False The
d.CreateDirectory(curDir
End I
Return curDi
End Function
 
Back
Top