C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,022 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How to resolve issue below
Argument 1: cannot convert from 'string' to 'System.IO.Stream'
on this line?
using (StreamWriter sw = new StreamWriter(@"c:/cmp/list10.txt", allowappend, Encoding.Unicode))
It will work if allowappend is a bool variable (true or false).
Also you can use this path: @"c:\cmp\list10.txt"
.