Показать сообщение отдельно
Старый 09.09.2010, 17:36   #3  
kornix is offline
kornix
MCP
MCBMSS
Злыдни
Ex AND Project
 
414 / 146 (5) +++++
Регистрация: 24.02.2009
Адрес: Санкт-Петербург
Используйте класс AsciiIo:

X++:
void AsciiIoExample()
{
    AsciiIo asciiIo;
    container con;
    FileIoPermission perm;
 
    #define.ExampleFile(@"c:\test.txt")
    #define.ExampleOpenMode("r")
 
    ;
    
    // The AsciiIO.new method runs under code access permission.
    perm = new FileIoPermission(#ExampleFile, #ExampleOpenMode);
    if (perm == null)
    {
        return;
    }
 
    // Code access permission scope starts here.
     perm.assert();
 
    // BP deviation documented.
     asciiIo = new AsciiIo(#ExampleFile, #ExampleOpenMode);
    if (asciiIo != null)
    {
          con = asciiIo.read();
    }
    // Closes the code access permission scope.
    CodeAccessPermission::revertAssert();
}
__________________
AXIOMA

Последний раз редактировалось kornix; 09.09.2010 в 18:03.
За это сообщение автора поблагодарили: ruslan_as (1).