|
Hi friends,
i have a txt file containing email id's like
test.txt
asdf@gmail.com
qwer@gmail.com
zxcv@gmail.com
when user imports test.txt file i want to get the all email id's by comma seperated value... using c#
asdf@gmail.com,qwer@gmail.com,zxcv@gmail.com ....
like this
how can i??
help me plzzz...
icanmakeiteasy
|
|
|
|
|
string[] emails = File.ReadAllLines(@"test.txt");<br />
StringBuilder stringBuilder = new StringBuilder();<br />
foreach(string email in emails)<br />
{<br />
stringBuilder.Append(email);<br />
stringBuilder.Append(",");<br />
}<br />
File.WriteAllText(@"newtext.txt", stringBuilder.ToString());
|
|
|
|
|
thank you... its working
and if the mails are separated by space like this
test.txt
asdf@gmail.com qwer@gmail.com zxcv@gmail.com
now can i get them by comma separated mails...
thank you
icanmakeiteasy
|
|
|
|
|
just change "," with " ".
|
|
|
|
|
thanks...
my input file is
test.txt
asdf@gmail.com qwer@gmail.com zxcv@gmail.com
now i want like this
asdf@gmail.com,qwer@gmail.com,zxcv@gmail.com
???
icanmakeiteasy
|
|
|
|
|
string alltexts = File.ReadAllText(@"test.txt");<br />
string[] emails = alltexts.Split(' ');<br />
StringBuilder stringBuilder = new StringBuilder();<br />
foreach (string email in emails)<br />
{<br />
stringBuilder.Append(email);<br />
stringBuilder.Append(",");<br />
}<br />
File.WriteAllText(@"newtext.txt", stringBuilder.ToString());
|
|
|
|
|
wow that's working.. thank you.....
icanmakeiteasy
|
|
|
|
|
hey guyz m working on voice over ip and text messaging and video conferencing using SIP protocol, i am dsoing this implementation in c# have to submit it as semester project i need help in its coding urgent response is requested if any one can give a working code or a part of a code tht i can work on. I will be greatful for ur coorperation and response regards...
|
|
|
|
|
Sarah!
sarah23626 wrote: hey guyz m working on voice over ip and text messaging and video conferencing using SIP protocol,
if you are really working and need some guidelines or help you should ask queries related to your work.
Not something like
sarah23626 wrote: urgent response is requested if any one can give a working code or a part of a code tht i can work on
Please do put some effort in your project which will not only make you to think and help in your technical career but also gives you a feeling of satisfaction.
Or if you can Rent or Geta Coder for completion of your work on behalf of you...
Have a Happy Coding.....
|
|
|
|
|
Hi,
I am trying to open pdf file which is in Solution explorer i am giving this path in code but still file isn't accessible
string pathtoPdfFile = "\\File\\Computershortcuts.pdf";
System.Diagnostics.Process.Start(pathtoPdfFile);
File is a Folder name in solution explorer and Computershortcuts.pdf is a file.
Kindly tell me what is correct path.
Thnxx
|
|
|
|
|
The only place for a double slash is the start of a network path, not the middle.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
Can anyone tell me where i can download Kristopher Johnson's TypedCollectionGenerator from??
Got a 404 with http://www.kristopherjohnson.net/kj/TypedCollectionGenerator
|
|
|
|
|
|
With code.
I would suggest based on your overall approach that it's probably beyond you, try learning some basics, and getting sufficiently aquainted with the web to know how to best ask questions, first.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi, I want to replace the PDF files opened on browser with corresponding PDF files which are on my desktop. I had got all these with the help of BHO in c#, but a small problem in this... i.e., I have been doing all these by firing a NavigateComplete2Event, through which I can get the URL present on browser, the problem is this Event is not getting fired at all times. What may the problem? why the event is not fired for every PDF file opened on browser? can anybody help me?
|
|
|
|
|
Hi,
I need to get the time diffrence between a function called.
eg:
A function called first time, after 1000 milliseconds second time called, after 500 millisecond third time called.....and go on
How can i get the time difrence between each function called?
Thankyou
YPKI
|
|
|
|
|
DateTime.Now is your friend.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Dear All,
I have a database in web server and off course i have ftp account and user name of that web server too.
i have got 1mb upload bandwith, my question is very simple.
I have application which connects to database in web server, and the same i have application which connects to FTP.
for database connectivity i am using SqlConnection and for FTP Connectiviy i am using WebClient.
which of these connectiviy is fast? FtP connectiviy or Database Connectiviy?
|
|
|
|
|
Faster for what ? The connectivity will be the same, it depends on the bandwidth available. The question is, how much data needs to move to do what you require.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
thx dude, I only mean connection speed, Database connectivity is fast or FTP connectivity.
not data exchange, no query just connection
|
|
|
|
|
Currently I'm using the following code which works fine for regular websites, it will click at the location in the browser object and everything works perfectly
When I try to use it to click on a flash section of a site however, it doesn't work.
any tips?
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
int x = 283;
int y = 342;
IntPtr handle = two.Handle;
StringBuilder className = new StringBuilder(100);
while (className.ToString() != "Internet Explorer_Server")
{
handle = GetWindow(handle, 5);
GetClassName(handle, className, className.Capacity);
}
IntPtr lParam = (IntPtr)((y << 16) | x);
IntPtr wParam = IntPtr.Zero;
const uint downCode = 0x201;
const uint upCode = 0x202;
SendMessage(handle, downCode, wParam, lParam);
SendMessage(handle, upCode, wParam, lParam);
|
|
|
|
|
Once you have a plug in running in IE, that's the window you need to search for, not IE itself.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
How would I go about doing that? once I have these things down the rest of my program is fairly straightforward but these parts I have no clue what I should be looking for
|
|
|
|
|
I thought (and confirmed? with microsoft's documentation) that a mouseup event should fire when the mouse is over a control and the button is release. However, in my application the mouseup is being fire FOR THE CONTROL THAT CAPTURED THE MOUSE DOWN (not for the control which the mouse is over when the button is released). How do i change this behavior so that the control being clicked is not decided until the mouse up? Thank you very much for your help.
|
|
|
|