Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
streamreader
- Page 1
Re: extracting data from specific column and row in text file
Programming
Software Development
11 Years Ago
by nickayin
StreamReader
tr = new
StreamReader
("C:\\Floor Schedule2.txt"); string line = tr.ReadLine(); …
Re: read a file byte by byte
Programming
Software Development
14 Years Ago
by farooqaaa
StreamReader
.Read takes char[] as the first argument not byte[]. Use this code if you want to use char[] array instead of byte[]: [CODE] char[] str = new char[12]; for(i=0; i < lenght_of_file; i++) { sr.Read(str,i,1); } [/CODE] Thanks
Re: ReadLine method
Programming
Software Development
13 Years Ago
by Chellam2
StreamReader
.ReadLine() reads one line at a time. If you want multiple lines you will have to loop through the data. Or, depending on the program, you may be able to do the event multiple times reading one line of text each time.
StreamReader
Programming
Software Development
15 Years Ago
by Jennifer84
I am using
StreamReader
to read a File. With the code below I am …;Green"] //Create an instance of
StreamReader
to read from a file.[/COLOR]
StreamReader
^ sr = gcnew
StreamReader
( "C:\\File.txt" ); [COLOR…
Re: StreamReader
Programming
Software Development
15 Years Ago
by Jennifer84
…;Green"] //Create an instance of
StreamReader
to read from a file.[/COLOR]
StreamReader
^ sr = gcnew
StreamReader
( "C:\\File.txt" ); String…
Re: StreamReader
Programming
Software Development
15 Years Ago
by Jennifer84
…;Green"]//Create an instance of
StreamReader
to read from a file.[/COLOR]
StreamReader
^ sr = gcnew
StreamReader
( "C:\\File.txt" ); String…
Re: StreamReader
Programming
Software Development
15 Years Ago
by Jennifer84
… a solution. [code] //Create an instance of
StreamReader
to read from a file.
StreamReader
^ sr = gcnew
StreamReader
( "C:\\File.txt" ); String…
Re: StreamReader
Programming
Software Development
15 Years Ago
by Sci@phy
… string fileName = @"c:\countrylist3.csv"; 6 7
StreamReader
sr = new
StreamReader
(fileName); 8 9 try 10 { 11 while (sr.Peek…
Re: StreamReader
Programming
Software Development
15 Years Ago
by Jennifer84
… vectors instead. Line->Split(Delimiter->ToString()); [code]
StreamReader
^ sr = gcnew
StreamReader
( "C:\\File.txt" ); String^ Delimiter = ","…
Re: streamreader
Programming
Software Development
13 Years Ago
by MattyRobot
looking on msdn ([URL="http://msdn.microsoft.com/en-us/library/system.io.
streamreader
.readtoend.aspx"]http://msdn.microsoft.com/en-us/library/system.io.
streamreader
.readtoend.aspx[/URL])
StreamReader
has a ReadToEnd function. is this what you were looking for?
StreamReader
Programming
Software Development
13 Years Ago
by m_wylie85
…\michael\Documents\data.txt ";//path to text file
StreamReader
reader = new
StreamReader
(file); string line = null; foreach (string record in reader…
streamreader
Programming
Software Development
13 Years Ago
by asadaziz
… the file the code i am using is [CODE]
StreamReader
^sr= gcnew
StreamReader
("example.txt"); String ^str; while(sr->…
Re: StreamReader and Position
Programming
Software Development
12 Years Ago
by pcolmer
… static void SetPosition(this
StreamReader
streamReader
, long position) {
streamReader
.BaseStream.Seek(position, SeekOrigin.Begin);
streamReader
.DiscardBufferedData(); } } [/CODE…target, Object[] args) at ExtensionMethods.GetPosition(
StreamReader
streamReader
) Is there something I've done …
Re: StreamReader and Position
Programming
Software Development
12 Years Ago
by hsummerhays
….Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null,
streamReader
, null); int charlen= (int)
streamReader
.GetType().InvokeMember( "charLen", BindingFlags.DeclaredOnly | BindingFlags…
Re: StreamReader and Position
Programming
Software Development
10 Years Ago
by Javier_4
…return line; }); } public static void Peek(this
StreamReader
reader, Action action) { if(action != null)… } } } public static void Peek(this
StreamReader
reader, Action<
StreamReader
> action) { if (action != null…
Re: StreamReader and Position
Programming
Software Development
10 Years Ago
by Javier_4
…return line; }); } public static void Peek(this
StreamReader
reader, Action action) { if(action != null)… } } } public static void Peek(this
StreamReader
reader, Action<
StreamReader
> action) { if (action != null…
StreamReader/Writer Error on Close
Programming
Software Development
14 Years Ago
by Darkicon
… file that the Reader read. The problem is that the
StreamReader
and Writer seem to fail to close. At first when…;, MsgBoxStyle.OkOnly, "Debug") Try Using sr As
StreamReader
= New
StreamReader
(ToolStripStatusLabel4.Text) Using sw As StreamWriter = New StreamWriter(Environment.GetEnvironmentVariable…
Re: StreamReader and Position
Programming
Software Development
18 Years Ago
by tgreer
…StreamReader2. /// </summary> public class StreamReader2 : System.IO.
StreamReader
{ public StreamReader2(String path) : base(path) { } }…} [/code] That derives a new class from [b]
StreamReader
[/b]. It also defines a constructor, overriding the particular … where I need help. The [b]
StreamReader
.ReadLine()[/b] method uses a lot of…
Re: StreamReader and Position
Programming
Software Development
18 Years Ago
by tgreer
…derive a class from [b]TextReader[/b], just as [b]
StreamReader
[/b] itself does. This means, in effect, I created…quot; class with all the functionality of a regular [b]
StreamReader
[/b], plus a [b]BytesRead[/b] property suitable for …The "gotchas" involve code that the native [b]
StreamReader
[/b] can access from the [b]System.IO[/b] namespace…
StreamReader and Position
Programming
Software Development
18 Years Ago
by tgreer
…basic issue is this: when using a [b]
StreamReader
[/b], and [b]ReadLine[/b], to process …; within a file. This is because [b]
StreamReader
[/b] doesn't actually read from a FILE,…of the record you just read with [b]
StreamReader
.ReadLine()[/b], you cannot know. There has to…back to it. I'm using a [b]
StreamReader
[/b] because I am indeed reading a text…
StreamReader and Position (In VB)
Programming
Software Development
17 Years Ago
by Jake1164
…has run into the following issue: when using a [B]
StreamReader
[/B], and [B]ReadLine[/B], to process a text … This is basically a hacked version of the .NET [B]
StreamReader
[/B] code. It adds two public properties, [B]LineLength[/B…[B].BaseStream.Seek()[/B]. It could be better. The real
StreamReader
code uses some methods internal to some of the core…
Re: StreamReader and Position (In VB)
Programming
Software Development
15 Years Ago
by vbguru2008
…;214443]I converted TGREER's C# implementation of a hacked
StreamReader
class to VB.NET and wanted to provide it for… As String) Dim contents As String Dim read As
StreamReader
Try read = New
StreamReader
(FullPath) contents = read.ReadToEnd read.Close() Return contents…
StreamReader with OpenReadAsync
Programming
Software Development
14 Years Ago
by Ultratermi
…++/Cli but its not rly different. [CODE] IO::
StreamReader
^ sr = gcnew IO::
StreamReader
(webClientOther->OpenReadAsync(gcnew Uri("Site"))); [/CODE…] In C#? [CODE] IO.
StreamReader
^ sr = new IO.
StreamReader
(webClientOther.OpenReadAsync(new Uri("Site"))); [/CODE] I…
Re: StreamReader and Position
Programming
Software Development
9 Years Ago
by Cesc_1
…'s so simple that it doesn't need even a
StreamReader
); now I want to add more accurate error reporting capabilities… where the error happens. The lack of positional information makes
StreamReader
/StringReader to be a class with low reusability. Note that…
Re: StreamReader and Position
Programming
Software Development
18 Years Ago
by tgreer
…. This is basically a hacked version of the .NET [b]
StreamReader
[/b] code. It adds two public properties, [b]LineLength[/b… [b].BaseStream.Seek()[/b]. It could be better. The real
StreamReader
code uses some methods internal to some of the core…
Re: StreamReader and Position
Programming
Software Development
18 Years Ago
by mfm24
… a similar problem and noticed there's a very useful
StreamReader
field called charPos which appears to be what you want… actually get the value was to use reflection: Int32 GetCharpos(
StreamReader
s) { Int32 charpos= (Int32) s.GetType().InvokeMember("charPos"…
Re: StreamReader and Position
Programming
Software Development
17 Years Ago
by joepgrooten
… was having similair problems, and your adapted version of the
StreamReader
provided me with enough information to solve it. Please note… that if you want to use Seek() in the
StreamReader
you must change the value of ReadBytes accordingly ! Otherwise it…
Re: StreamReader with OpenReadAsync
Programming
Software Development
14 Years Ago
by kvprajapati
…::WriteLine("Object : " + e->UserState); IO::
StreamReader
^ sr=gcnew IO::
StreamReader
(e->Result); ..... } int main(array<System::String…
StreamReader/Writer help
Programming
Software Development
13 Years Ago
by SciFiCoder
…create a program that uses StreamWriter and
StreamReader
objects to open two text files. …"); } } sw.Write("\n");
StreamReader
sr = new
StreamReader
(valueTextFilePath); // Opens existing file for reading if (File…
StreamReader From FileOpenDialog
Programming
Software Development
12 Years Ago
by Scottishidiot
…openfiledialog to find a file and then use
streamreader
to read the text and use it in…HiScoreOpen.FileName;
StreamReader
SR = null; SR = new
StreamReader
(HiScoreOpen.FileName);…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC