Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

powerscript/.net interop question, PB 11.5

$
0
0

I'm working in PB11.5, deploying as a .NET assembly.

 

I'm trying to write to a file for log purposes and I've timed the following in C# and it's fast enough for my needs:

 

using (FileStream f = new FileStream(ls_filename, FileMode.Append, FileAccess.Write))

     using (StreamWriter s = new StreamWriter(f))

          s.WriteLine(as_message);

 

This is the code causing me a problem. It's wrapped with the PBDOTNET directive, but  pb2cs keeps choking on it.

 

 

  • System.IO.FileStream fs
  • fs = create System.IO.FileStream(ls_filename, System.IO.FileMode.Append, System.IO.FileAccess.Write)

 

 

I keep getting the error that there's no appropriate FileStream constructor, but there is!

 

 

I know you can't do any type of complex assignment so maybe the reference to the System enumerate values is the problem or casting of some sort? Any help would be greatly appreciated.  Hopefully this is the right forum to ask technical questions. As you know, PB discussion forums are scarce these days.

 

 

 

(relevant PB 12.5 link)

SyBooks Online


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>