Cast to delegate type fails in JScript.NET
- by dnewcome
I am trying to do async IO using BeginRead() in JScript.NET, but I can't get the callback function to work correctly.
Here is the code:
function readFileAsync() {
var fs : FileStream = new FileStream( 'test.txt', FileMode.Open, FileAccess.Read );
var result : IAsyncResult = fs.BeginRead( new byte[8], 0, 8, readFileCallback ), fs );
…