File: FileNotFoundException.xml

package info (click to toggle)
mono 6.8.0.105%2Bdfsg-3.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,284,512 kB
  • sloc: cs: 11,172,132; xml: 2,850,069; ansic: 671,653; cpp: 122,091; perl: 59,366; javascript: 30,841; asm: 22,168; makefile: 20,093; sh: 15,020; python: 4,827; pascal: 925; sql: 859; sed: 16; php: 1
file content (474 lines) | stat: -rw-r--r-- 26,700 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<?xml version="1.0" encoding="utf-8"?>
<Type Name="FileNotFoundException" FullName="System.IO.FileNotFoundException" FullNameSP="System_IO_FileNotFoundException" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public serializable FileNotFoundException extends System.IO.IOException" />
  <TypeSignature Language="C#" Value="public class FileNotFoundException : System.IO.IOException" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit FileNotFoundException extends System.IO.IOException" />
  <MemberOfLibrary>BCL</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.IO.IOException</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <example>
      <para>The following example demonstrates an error that causes
      the <see cref="T:System.IO.FileNotFoundException" />
      exception to be thrown.</para>
      <code lang="C#">using System;
using System.IO;
class FileNotFoundExample {
    public static void Main () {
    string badPath = "/Eccma/examples/FileTest.cs";
    string goodPath = "/Ecma/examples2/FileTest.cs";
    try {
        File.Copy(badPath,goodPath);
    }
    catch (FileNotFoundException e) {
    Console.WriteLine("Caught: {0}",e.Message);
    }
    }
}
   </code>
      <para>The output is</para>
      <c>
        <para>Caught: Could not find file "/Eccma/examples/FileTest.cs".</para>
      </c>
    </example>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>FileNotFoundException uses the HRESULT COR_E_FILENOTFOUND which has the value 0x80070002.</para>
      <para>If your code does not have <see cref="P:System.Security.Permissions.FileIOPermissionAttribute.PathDiscovery" /> permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>The exception that is thrown when an attempt to access a file that does not exist on disk fails.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="public FileNotFoundException ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor initializes the <see cref="P:System.IO.FileNotFoundException.Message" /> property of the new instance to a system-supplied message that describes the error, such as "Could not find the specified file." This message takes into account the current system culture.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with its message string set to a system-supplied message and its HRESULT set to COR_E_FILENOTFOUND.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message)" />
      <MemberSignature Language="C#" Value="public FileNotFoundException (string message);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters>
        <Parameter Name="message" Type="System.String" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor initializes the <see cref="P:System.IO.FileNotFoundException.Message" /> property of the new instance using <paramref name="message" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with its message string set to <paramref name="message" /> and its HRESULT set to COR_E_FILENOTFOUND.</para>
        </summary>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />A description of the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="protected FileNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
      <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with the specified serialization and context information.</para>
        </summary>
        <param name="info">
          <attribution license="cc4" from="Microsoft" modified="false" />An object that holds the serialized object data about the exception being thrown. </param>
        <param name="context">
          <attribution license="cc4" from="Microsoft" modified="false" />An object that contains contextual information about the source or destination. </param>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, class System.Exception innerException)" />
      <MemberSignature Language="C#" Value="public FileNotFoundException (string message, Exception innerException);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Exception innerException) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters>
        <Parameter Name="message" Type="System.String" />
        <Parameter Name="innerException" Type="System.Exception" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the <see cref="P:System.Exception.InnerException" /> property. The <see cref="P:System.Exception.InnerException" /> property returns the same value that is passed into the constructor, or null if the <see cref="P:System.Exception.InnerException" /> property does not supply the inner exception value to the constructor.</para>
          <para>The following table shows the initial property values for an instance of <see cref="T:System.IO.FileNotFoundException" />.</para>
          <list type="table">
            <listheader>
              <item>
                <term>
                  <para>Property </para>
                </term>
                <description>
                  <para>Value </para>
                </description>
              </item>
            </listheader>
            <item>
              <term>
                <para>
                  <see cref="P:System.Exception.InnerException" /> </para>
              </term>
              <description>
                <para>The inner exception reference. </para>
              </description>
            </item>
            <item>
              <term>
                <para>
                  <see cref="P:System.Exception.Message" /> </para>
              </term>
              <description>
                <para>The error message string. </para>
              </description>
            </item>
          </list>
          <para>For more information on inner exceptions, see <see cref="P:System.Exception.InnerException" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</para>
        </summary>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />A description of the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture. </param>
        <param name="innerException">
          <attribution license="cc4" from="Microsoft" modified="false" />The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, string fileName)" />
      <MemberSignature Language="C#" Value="public FileNotFoundException (string message, string fileName);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, string fileName) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters>
        <Parameter Name="message" Type="System.String" />
        <Parameter Name="fileName" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="fileName">
          <attribution license="cc4" from="Microsoft" modified="false" />The full name of the file with the invalid image. </param>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The constructor initializes the <see cref="P:System.IO.FileNotFoundException.Message" /> property of the new instance using <paramref name="message" /> and the <see cref="P:System.IO.FileNotFoundException.FileName" /> property using <paramref name="fileName" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with its message string set to <paramref name="message" />, specifying the file name that cannot be found, and its HRESULT set to COR_E_FILENOTFOUND.</para>
        </summary>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />A description of the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture. </param>
        <param name="fileName">
          <attribution license="cc4" from="Microsoft" modified="false" />The full name of the file with the invalid image. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, string fileName, class System.Exception innerException)" />
      <MemberSignature Language="C#" Value="public FileNotFoundException (string message, string fileName, Exception innerException);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, string fileName, class System.Exception innerException) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters>
        <Parameter Name="message" Type="System.String" />
        <Parameter Name="fileName" Type="System.String" />
        <Parameter Name="innerException" Type="System.Exception" />
      </Parameters>
      <Docs>
        <param name="innerException">
          <attribution license="cc4" from="Microsoft" modified="false" />The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the <see cref="P:System.Exception.InnerException" /> property. The <see cref="P:System.Exception.InnerException" /> property returns the same value that is passed into the constructor, or null if the <see cref="P:System.Exception.InnerException" /> property does not supply the inner exception value to the constructor.</para>
          <para>The following table shows the initial property values for an instance of <see cref="T:System.IO.FileNotFoundException" />.</para>
          <list type="table">
            <listheader>
              <item>
                <term>
                  <para>Property </para>
                </term>
                <description>
                  <para>Value </para>
                </description>
              </item>
            </listheader>
            <item>
              <term>
                <para>
                  <see cref="P:System.Exception.InnerException" /> </para>
              </term>
              <description>
                <para>The inner exception reference. </para>
              </description>
            </item>
            <item>
              <term>
                <para>
                  <see cref="P:System.Exception.Message" /> </para>
              </term>
              <description>
                <para>The error message string. </para>
              </description>
            </item>
          </list>
          <para>For more information on inner exceptions, see <see cref="P:System.Exception.InnerException" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</para>
        </summary>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param>
        <param name="fileName">
          <attribution license="cc4" from="Microsoft" modified="false" />The full name of the file with the invalid image. </param>
        <param name="innerException">
          <attribution license="cc4" from="Microsoft" modified="false" />The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="FileName">
      <MemberSignature Language="ILASM" Value=".property string FileName { public hidebysig specialname instance string get_FileName() }" />
      <MemberSignature Language="C#" Value="public string FileName { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string FileName" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para>A <see cref="T:System.String" /> containing the name of the file, or
<see langword="null" /> if no file
   name was passed to the constructor for the current instance.</para>
        </value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This property is read-only.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the name of the file that cannot be found.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="FusionLog">
      <MemberSignature Language="C#" Value="public string FusionLog { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string FusionLog" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the log file that describes why loading of an assembly failed.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="GetObjectData">
      <MemberSignature Language="C#" Value="public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the file name and additional exception information.</para>
        </summary>
        <param name="info">
          <attribution license="cc4" from="Microsoft" modified="false" />The object that holds the serialized object data about the exception being thrown. </param>
        <param name="context">
          <attribution license="cc4" from="Microsoft" modified="false" />The object that contains contextual information about the source or destination. </param>
      </Docs>
    </Member>
    <Member MemberName="Message">
      <MemberSignature Language="ILASM" Value=".property string Message { public hidebysig virtual specialname string get_Message() }" />
      <MemberSignature Language="C#" Value="public override string Message { get; }" />
      <MemberSignature Language="ILAsm" Value=".property instance string Message" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para>A <see cref="T:System.String" /> containing the
   error message. This string includes the <see cref="P:System.IO.FileNotFoundException.FileName" /> if a value for that property was supplied to the
   constructor for the current instance.</para>
        </value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If no message was supplied to the constructor for the current exception, this property returns a system-supplied error message. If the <see cref="P:System.IO.FileLoadException.FileName" /> property is not null, the message includes the file name.</para>
          <para>This property is read-only.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the error message that explains the reason for the exception.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ToString">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ToString()" />
      <MemberSignature Language="C#" Value="public override string ToString ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <example>
          <para>The following example causes a <see cref="T:System.IO.FileNotFoundException" /> exception and displays the result
   of calling <see langword="ToString" /> on that Exception.</para>
          <code lang="C#">using System;
using System.IO;
class FileNotFoundExample {
  public static void Main () {
    string badPath = "/Eccma/examples/FileTest.cs";
    string goodPath = "/Ecma/examples2/FileTest.cs";
    try {
        File.Copy(badPath,goodPath);
    }
    catch (FileNotFoundException e) {
        Console.WriteLine("Caught: {0}",e.ToString());
    }
  }
}
</code>
          <para>The output is </para>
          <code>
Caught: System.IO.FileNotFoundException: Could not find file "/Eccma/examples/FileTest.cs".
File name: "/Eccma/examples/FileTest.cs"
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName,
      Boolean overwrite)
   at FileNotFoundExample.Main()
 </code>
        </example>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This method overrides <see cref="M:System.Object.ToString" />.</para>
          <para>The string representation returned by this method includes the name of the exception, the value of the <see cref="P:System.IO.FileNotFoundException.Message" /> property, the result of calling ToString on the inner exception, the value of the <see cref="P:System.IO.FileNotFoundException.FileName" /> property, and the result of calling <see cref="P:System.Environment.StackTrace" />. If any of these members is a null reference, its value is not included in the returned string.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Returns the fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The fully qualified name of this exception and possibly the error message, the name of the inner exception, and the stack trace.</para>
        </returns>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>