473,379 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Conversions

Hey,
I need to convert a Stream I get from a Save File dialog
(the path) into a string so that my StreamWriter knows
what the current path is. Any input?

Thanks,
Chris
Nov 15 '05 #1
2 1027
Try the System.Text.Encoding.ASCII.GetString() method.

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Chris" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
Hey,
I need to convert a Stream I get from a Save File dialog
(the path) into a string so that my StreamWriter knows
what the current path is. Any input?

Thanks,
Chris

Nov 15 '05 #2
Chris,
I need to convert a Stream I get from a Save File dialog
(the path) into a string so that my StreamWriter knows
what the current path is. Any input?


Why don't you get the path from the FileName property of the
OpenFileDialog?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Reneé | last post by:
I wanted to know the order of implicit conversions and which sort of values allow them. From searching around in books and the archive of this mailing list, it seems to be that only numbers are...
15
by: buda | last post by:
Let me see if I got this :) 1. I know the rules for type conversions in arithmetic expressions 2. I know that an implicit type conversion is done at assignment, so float x = 1.23; int t = (int)...
10
by: vb | last post by:
Hi all, I am a newbie in C and i want to know what all pointer conversions are "legal" according to ANSI C standard. For Example, int* to char*, some_struct* to char* and so on .. According to...
4
by: O. Zimmermann | last post by:
Hi all, A variable with an enumerated type can be set with a value from any other generic "enum" type in the program, or with an integer value, without notice to the user, neither at compilation...
31
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1();...
2
by: Brian Henry | last post by:
is there info about data type conversions between access to ado.net? I have tried a lot of the ones that say oledb data types should work for and get a lot of "data type mismatch" errors using...
36
by: Chad Z. Hower aka Kudzu | last post by:
I have an implicit conversion set up in an assembly from a Stream to something else. In C#, it works. In VB it does not. Does VB support implicit conversions? And if so any idea why it would work...
5
by: Daz | last post by:
Hi everyone! I am very new to casting and converting, so much in fact then when I think I have it figured out, something proves me wrong. I was wondering if there is any logic in 'what types can...
2
by: adsci | last post by:
Hello! Im posting this to c.l.c++ AND win32 because i dont know if this is a MS Compiler Issue or not. here we go: <code> class MyCString
3
by: Wayne | last post by:
Are user-defined conversions chosen at compile time, or are there ways to make sure that they are chosen at run-time, based on the actual type of the object? Here is a simplified example of what...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.