hey all,
i was wondering how would i take the contents of my StrigBuilder variable
and out put all of it to my text file?
thanks,
rodchar 15 1122
"rodchar" <ro*****@discussions.microsoft.com> schrieb: i was wondering how would i take the contents of my StrigBuilder variable and out put all of it to my text file?
\\\
Dim sw As New StreamWriter(...)
sw.Write(sb.ToString())
sw.Close()
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Herfried, \\\ Dim sw As New StreamWriter(...) sw.Write(sb.ToString()) sw.Close() ///
Mixed C# code?
Cor
Cor,
"Cor Ligthert" <no************@planet.nl> schrieb: \\\ Dim sw As New StreamWriter(...) sw.Write(sb.ToString()) sw.Close() ///
Mixed C# code?
Why?!
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>> Mixed C# code? Why?!
ToString()
Close()
"Cor Ligthert" <no************@planet.nl> schrieb: Mixed C# code?
Why?!
ToString() Close()
Huh?! How would you do that with the 'StringBuilder' and 'StreamWriter'?!
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/> ToString() Close()
Huh?! How would you do that with the 'StringBuilder' and 'StreamWriter'?!
Dim sb As New System.Text.StringBuilder
Dim a As String = sb.ToString
Cor
"Cor Ligthert" <no************@planet.nl> schrieb: Dim sb As New System.Text.StringBuilder Dim a As String = sb.ToString
Remember what the OP asked:
| i was wondering how would i take the contents of
| my StrigBuilder variable and out put all of it to my text file?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Herfried,
It is not that important that we build such a long thread from it, I noticid
it, and thought about your messages you have written, where you told that
you did not like those everywhere needed () in C#
And see in the sb.tostring is that not really needed, that was all.
Maybe should I have added a :-)
Dim sw As New IO.StreamWriter("bla")
Dim sb As New System.Text.StringBuilder
sw.Write(sb.ToString)
sw.Close()
Cor
Thanks this helped a lot. I appreciate the dialog.
"rodchar" wrote: hey all,
i was wondering how would i take the contents of my StrigBuilder variable and out put all of it to my text file?
thanks, rodchar
Cor, sw.Write(sb.ToString)
Appears to be a Property call, hence I normally use:
sw.Write(sb.ToString())
To emphasis that it is a Function call!
Granted the VB compiler does care either way, so its largely a style thing.
Like Herfried I really question what this has to do with C#???
Just a thought
Jay
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uA**************@TK2MSFTNGP15.phx.gbl... Herfried,
It is not that important that we build such a long thread from it, I noticid it, and thought about your messages you have written, where you told that you did not like those everywhere needed () in C#
And see in the sb.tostring is that not really needed, that was all. Maybe should I have added a :-) Dim sw As New IO.StreamWriter("bla")
Dim sb As New System.Text.StringBuilder
sw.Write(sb.ToString)
sw.Close()
Cor
Jay,
Nothing this thread is already much to long,
It was only that I saw that Herfried had written ToString() what I am not
used from him.
:-)
Cor
Cor,
"Cor Ligthert" <no************@planet.nl> schrieb: it, and thought about your messages you have written, where you told that you did not like those everywhere needed () in C#
And see in the sb.tostring is that not really needed, that was all. Maybe should I have added a :-) Dim sw As New IO.StreamWriter("bla")
Dim sb As New System.Text.StringBuilder
sw.Write(sb.ToString)
sw.Close()
I always add '()' to calls to parameterless functions to distinguish them
from property "calls". I don't see how this would make my code look more
C#ish.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Herfried,
Ok,
:-)
EOT
Cor
Cor Ligthert wrote: Jay,
Nothing this thread is already much to long, It was only that I saw that Herfried had written ToString() what I am not used from him.
:-)
Cor
Are you two secretly an old married couple? ;-)
Cor Ligthert wrote: Jay,
Nothing this thread is already much to long, It was only that I saw that Herfried had written ToString() what I am not used from him.
:-)
Cor
Are you two secretly an old married couple? ;-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: joes |
last post by:
Hello there !
I rendering a PDF with XSLT using Xalan and FOP.
I like to place in my article an image, so that the text is floating
around the image. I tried several things but it didn't work so...
|
by: Xerxes |
last post by:
Hi,
I need help in setting up a page where the text wraps around an image.
Right now, I am using table, with text in one <td> and the image in the
adjacent <td>. The problem is when the text is...
|
by: Macsicarr |
last post by:
Hi All
Wonder if you could help me.
I have created a CMS system that allows the user to enter text and pic
'tags' for their own About us page, eg
text.... text.... text.... text.......
|
by: Jiri Palecek |
last post by:
I have a question on web authoring (probably HTML+CSS). Is it
somehow possible to put two words above each other inside a paragraph
so the result would be valid and render at least in Mozilla?
I...
|
by: Arif Çimen |
last post by:
Hi to everybody,
I have chnged a button text in design mode. But After compiling and
executing the program
the text of the button do not change to new value.
Any Ideas?
Thaks for helps.
|
by: jweinberg1975 |
last post by:
I would like for users to be able to select from a small number of options
that come from a little drop down menu which then closes.
.....
|
by: bbepristis |
last post by:
Hey all I have this code that reads from one text file writes to
another unless im on a certian line then it writes the new data however
it only seems to do about 40 lines then quits and I cant...
|
by: acecraig100 |
last post by:
I am fairly new to Javascript. I have a form that users fill out to
enter an animal to exhibit at a fair. Because we have no way of
knowing, how many animals a user may enter, I created a table...
|
by: jonniethecodeprince |
last post by:
Hi all,
I have trouble getting an array of data stored in a separate javascript file i.e. a file called books.js into a table of data for a .xhtml file.
There are 50 Records in this file....
|
by: bluemountain |
last post by:
Hi there,
Iam new to python forms and programming too
I had a text file where i need to extract few words of data from the header(which is of 3 lines) and search for the keyword TEXT1, TEXT2,...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |