|
45 | 45 | |
46 | 46 | To set the <xref:System.Diagnostics.Debug.AutoFlush%2A> and <xref:System.Diagnostics.Debug.IndentSize%2A> for <xref:System.Diagnostics.Debug>, you can edit the configuration file corresponding to the name of your application. The configuration file should be formatted as shown in the following example. |
47 | 47 | |
48 | | -``` |
| 48 | +```xml |
49 | 49 | <configuration> |
50 | 50 | <system.diagnostics> |
51 | 51 | <trace autoflush="true" indentsize="7" /> |
|
153 | 153 | |
154 | 154 | You can change the behavior of the <xref:System.Diagnostics.DefaultTraceListener> in the configuration file that corresponds to the name of your application. In this file, you can enable and disable the assert message box or set the <xref:System.Diagnostics.DefaultTraceListener.LogFileName%2A?displayProperty=nameWithType> property. The configuration file should be formatted as follows: |
155 | 155 | |
156 | | -``` |
| 156 | +```xml |
157 | 157 | <configuration> |
158 | 158 | <system.diagnostics> |
159 | 159 | <assert assertuienabled="true" logfilename="c:\\myFile.log" /> |
|
236 | 236 | |
237 | 237 | You can change the behavior of the <xref:System.Diagnostics.DefaultTraceListener> in the configuration file that corresponds to the name of your application. In this file, you can enable and disable the assert message box or set the <xref:System.Diagnostics.DefaultTraceListener.LogFileName%2A?displayProperty=nameWithType> property. The configuration file should be formatted as follows: |
238 | 238 | |
239 | | -``` |
| 239 | +```xml |
240 | 240 | <configuration> |
241 | 241 | <system.diagnostics> |
242 | 242 | <assert assertuienabled="true" logfilename="c:\\myFile.log" /> |
|
320 | 320 | |
321 | 321 | You can change the behavior of the <xref:System.Diagnostics.DefaultTraceListener> in the configuration file that corresponds to the name of your application. In this file, you can enable and disable the assert message box or set the <xref:System.Diagnostics.DefaultTraceListener.LogFileName%2A?displayProperty=nameWithType> property. The configuration file should be formatted as follows: |
322 | 322 | |
323 | | -``` |
| 323 | +```xml |
324 | 324 | <configuration> |
325 | 325 | <system.diagnostics> |
326 | 326 | <assert assertuienabled="true" logfilename="c:\\myFile.log" /> |
|
414 | 414 | |
415 | 415 | You can change the behavior of the <xref:System.Diagnostics.DefaultTraceListener> in the configuration file that corresponds to the name of your application. In this file, you can enable and disable the assert message box or set the <xref:System.Diagnostics.DefaultTraceListener.LogFileName%2A?displayProperty=nameWithType> property. The configuration file should be formatted as follows: |
416 | 416 | |
417 | | -``` |
| 417 | +```xml |
418 | 418 | <configuration> |
419 | 419 | <system.diagnostics> |
420 | 420 | <assert assertuienabled="true" logfilename="c:\\myFile.log" /> |
|
464 | 464 | |
465 | 465 | To set the <xref:System.Diagnostics.Debug.AutoFlush%2A> and <xref:System.Diagnostics.Debug.IndentSize%2A> for <xref:System.Diagnostics.Debug>, you can also edit the configuration file corresponding to the name of your application. The configuration file should be formatted as shown in the following example. |
466 | 466 | |
467 | | -``` |
| 467 | +```xml |
468 | 468 | <configuration> |
469 | 469 | <system.diagnostics> |
470 | 470 | <trace autoflush="true" indentsize="7" /> |
@@ -927,7 +927,7 @@ End of list of errors |
927 | 927 | |
928 | 928 | To set the <xref:System.Diagnostics.Debug.AutoFlush%2A> and <xref:System.Diagnostics.Debug.IndentSize%2A> for <xref:System.Diagnostics.Debug>, you can also edit the configuration file corresponding to the name of your application. The configuration file should be formatted as shown in the following example. |
929 | 929 | |
930 | | -``` |
| 930 | +```xml |
931 | 931 | <configuration> |
932 | 932 | <system.diagnostics> |
933 | 933 | <trace autoflush="true" indentsize="7" /> |
@@ -1543,14 +1543,14 @@ End of list of errors |
1543 | 1543 |
|
1544 | 1544 | First example: |
1545 | 1545 |
|
1546 | | -``` |
| 1546 | +```csharp |
1547 | 1547 | if(mySwitch.TraceError) |
1548 | 1548 | Debug.Write("aNumber = " + aNumber + " out of range"); |
1549 | 1549 | ``` |
1550 | 1550 |
|
1551 | 1551 | Second example: |
1552 | 1552 |
|
1553 | | -``` |
| 1553 | +```csharp |
1554 | 1554 | Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1555 | 1555 | ```</para> |
1556 | 1556 | </block> |
@@ -1630,14 +1630,14 @@ Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1630 | 1630 |
|
1631 | 1631 | First example: |
1632 | 1632 |
|
1633 | | -``` |
| 1633 | +```csharp |
1634 | 1634 | if(mySwitch.TraceError) |
1635 | 1635 | Debug.Write("aNumber = " + aNumber + " out of range"); |
1636 | 1636 | ``` |
1637 | 1637 |
|
1638 | 1638 | Second example: |
1639 | 1639 |
|
1640 | | -``` |
| 1640 | +```csharp |
1641 | 1641 | Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1642 | 1642 | ```</para> |
1643 | 1643 | </block> |
@@ -1721,14 +1721,14 @@ Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1721 | 1721 |
|
1722 | 1722 | First example: |
1723 | 1723 |
|
1724 | | -``` |
| 1724 | +```csharp |
1725 | 1725 | if(mySwitch.TraceError) |
1726 | 1726 | Debug.Write("aNumber = " + aNumber + " out of range"); |
1727 | 1727 | ``` |
1728 | 1728 |
|
1729 | 1729 | Second example: |
1730 | 1730 |
|
1731 | | -``` |
| 1731 | +```csharp |
1732 | 1732 | Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1733 | 1733 | ```</para> |
1734 | 1734 | </block> |
@@ -1812,14 +1812,14 @@ Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1812 | 1812 |
|
1813 | 1813 | First example: |
1814 | 1814 |
|
1815 | | -``` |
| 1815 | +```csharp |
1816 | 1816 | if(mySwitch.TraceError) |
1817 | 1817 | Debug.Write("aNumber = " + aNumber + " out of range"); |
1818 | 1818 | ``` |
1819 | 1819 |
|
1820 | 1820 | Second example: |
1821 | 1821 |
|
1822 | | -``` |
| 1822 | +```csharp |
1823 | 1823 | Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
1824 | 1824 | ```</para> |
1825 | 1825 | </block> |
@@ -2267,14 +2267,14 @@ Debug.WriteIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
2267 | 2267 |
|
2268 | 2268 | First example: |
2269 | 2269 |
|
2270 | | -``` |
| 2270 | +```csharp |
2271 | 2271 | if(mySwitch.TraceError) |
2272 | 2272 | Debug.WriteLine("aNumber = " + aNumber + " out of range"); |
2273 | 2273 | ``` |
2274 | 2274 |
|
2275 | 2275 | Second example: |
2276 | 2276 |
|
2277 | | -``` |
| 2277 | +```csharp |
2278 | 2278 | Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
2279 | 2279 | ```</para> |
2280 | 2280 | </block> |
@@ -2355,14 +2355,14 @@ Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range") |
2355 | 2355 |
|
2356 | 2356 | First example: |
2357 | 2357 |
|
2358 | | -``` |
| 2358 | +```csharp |
2359 | 2359 | if(mySwitch.TraceError) |
2360 | 2360 | Debug.WriteLine("aNumber = " + aNumber + " out of range"); |
2361 | 2361 | ``` |
2362 | 2362 |
|
2363 | 2363 | Second example: |
2364 | 2364 |
|
2365 | | -``` |
| 2365 | +```csharp |
2366 | 2366 | Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
2367 | 2367 | ```</para> |
2368 | 2368 | </block> |
@@ -2446,14 +2446,14 @@ Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range") |
2446 | 2446 |
|
2447 | 2447 | First example: |
2448 | 2448 |
|
2449 | | -``` |
| 2449 | +```csharp |
2450 | 2450 | if(mySwitch.TraceError) |
2451 | 2451 | Debug.WriteLine("aNumber = " + aNumber + " out of range"); |
2452 | 2452 | ``` |
2453 | 2453 |
|
2454 | 2454 | Second example: |
2455 | 2455 |
|
2456 | | -``` |
| 2456 | +```csharp |
2457 | 2457 | Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
2458 | 2458 | ```</para> |
2459 | 2459 | </block> |
@@ -2538,14 +2538,14 @@ Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range") |
2538 | 2538 |
|
2539 | 2539 | First example: |
2540 | 2540 |
|
2541 | | -``` |
| 2541 | +```csharp |
2542 | 2542 | if(mySwitch.TraceError) |
2543 | 2543 | Debug.WriteLine("aNumber = " + aNumber + " out of range"); |
2544 | 2544 | ``` |
2545 | 2545 |
|
2546 | 2546 | Second example: |
2547 | 2547 |
|
2548 | | -``` |
| 2548 | +```csharp |
2549 | 2549 | Debug.WriteLineIf(mySwitch.TraceError, "aNumber = " + aNumber + " out of range"); |
2550 | 2550 | ```</para> |
2551 | 2551 | </block> |
|
0 commit comments