Consultor Eletrônico



Kbase P163648: ABL: How to call the System.IO.Path.GetInvalidFileNameChars() .NET Framework Class Library method?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/14/2010
Status: Unverified

GOAL:

ABL: How to call the System.IO.Path.GetInvalidFileNameChars() .NET Framework Class Library method?

GOAL:

How to call the System.IO.Path.Path.GetInvalidPathChars() .NET Framework Class Library method?

GOAL:

How to access individual array members returned by the System.IO.Path.System.IO.Path:GetInvalidFileNameChars() method?

GOAL:

How to get individual array elements returned by the System.IO.Path.Path.GetInvalidPathChars() .NET method?

FACT(s) (Environment):

Windows
OpenEdge 10.2x

FIX:

The following calls the System.IO.Path.GetInvalidFileNameChars() and the System.IO.Path.Path.GetInvalidPathChars() .NET Framework Class Library methods and displays the individual elements of the array returned by these calls:
DEFINE VARIABLE cInvalidPathChars AS CHARACTER EXTENT.
DEFINE VARIABLE cInvalidFileNameChars AS CHARACTER EXTENT.
DEFINE VARIABLE iLoopCounter AS INTEGER NO-UNDO.
ASSIGN
cInvalidPathChars = System.IO.Path:GetInvalidPathChars().
REPEAT iLoopCounter = 1 TO EXTENT(cInvalidPathChars):
DISPLAY
iLoopCounter LABEL "Number"
cInvalidPathChars[iLoopCounter] LABEL "Character"
ASC(cInvalidPathChars[iLoopCounter]) LABEL "ASCII"
WITH FRAME InvalidPathChars TITLE "InvalidPathChars" DOWN.
END.
ASSIGN
cInvalidFileNameChars = System.IO.Path:GetInvalidFileNameChars().
REPEAT iLoopCounter = 1 TO EXTENT(cInvalidFileNameChars):
DISPLAY
iLoopCounter LABEL "Number"
cInvalidFileNameChars[iLoopCounter] LABEL "Character"
ASC(cInvalidFileNameChars[iLoopCounter]) LABEL "ASCII"
WITH FRAME InvalidFileNameChars TITLE "InvalidFileNameChars" DOWN.
END.