| | |
Substring in C#
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Dec 2008
Posts: 14
Reputation:
Solved Threads: 1
Why doesn't someone answer with just a quick example instead of saying things like "lookup string"?
As a VB-oriented programmer, if someone mentions Left() and they are trying to find an alternative in C#, then a C# expert should just post the c# equivalent of:
Left(somevariable, 3) & somenumber
Fab
As a VB-oriented programmer, if someone mentions Left() and they are trying to find an alternative in C#, then a C# expert should just post the c# equivalent of:
Left(somevariable, 3) & somenumber
Fab
Lizr and Danny don't answer people with code especially who don't show their effort in solving easy problem, they're right, aren't they?!
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
We dont just hand you the answer because you have demonstrated you dont know how to find out information for yourself, something as simple as this should be something you find in the helpfile - if your question had been more of
Ive got this code, I dont see why its producing <this> when I expected <that> sure, you're likely to see a more informative response, but when the answer is a case of Press F1 for help and read the info you already have to hand, you shouldnt need someone to tell you
Ive got this code, I dont see why its producing <this> when I expected <that> sure, you're likely to see a more informative response, but when the answer is a case of Press F1 for help and read the info you already have to hand, you shouldnt need someone to tell you
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
•
•
•
•
Originally Posted by Fabm
As a VB-oriented programmer, if someone mentions Left() and they are trying to find an alternative in C#, then a C# expert should just post the c# equivalent of:
Left, Right and Mid are all flavours of one thing in C# : Substring
If I was new to C# and I would ask myself "How can I do Left in C#?"and LizR gave me the answer "He man look under String"(see #2) The first thing I would do then is lookup the String class and see what it does. If I found a method that would solve my needs I would post a thank you an mark the thread as solved. If I still had the faintest idea of how to go on I would post a new question and mention the things I already had done.
Last edited by ddanbe; Jan 2nd, 2009 at 7:54 am.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
•
•
Join Date: Jul 2007
Posts: 276
Reputation:
Solved Threads: 37
I'm just a guy trying to learn so take my advice with a grain of salt -
first off, I agree with the others, and they are not heartless, just tired of a lot of people working on a project for school somewhere who want us to write their code for them.
If I'm not mistaken what you want is something like this
transfers to
at least I think that's correct.
(By the way, look at the number of threads they have marked as "solved" - they are willing to help, they just want some effort from the poster first...)
first off, I agree with the others, and they are not heartless, just tired of a lot of people working on a project for school somewhere who want us to write their code for them.
If I'm not mistaken what you want is something like this
C# Syntax (Toggle Plain Text)
Left(somevariable, 3)
transfers to
C# Syntax (Toggle Plain Text)
somevariable.Substring(0,3);
at least I think that's correct.
(By the way, look at the number of threads they have marked as "solved" - they are willing to help, they just want some effort from the poster first...)
Last edited by rapture; Jan 2nd, 2009 at 4:59 pm.
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
Rapture is right, its not that we hate you or want you to hate us either. However the addage, give a man a fish, he eats for the day, give a man a fishing rod he can eat for a year.
If we give you an a line of code, what did you learn, we will feed you.
If we give you places to look and how to find your answers..
You learn to find them yourself and work faster and smarter.
If we give you an a line of code, what did you learn, we will feed you.
If we give you places to look and how to find your answers..
You learn to find them yourself and work faster and smarter.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
![]() |
Similar Threads
- error creating substring (VB.NET)
- Problem In using Substring.. (Java)
- Removing a substring from a string (Python)
- Getting a substring substring, but without 2 strings (C++)
- Substring Search (Python)
Other Threads in the C# Forum
- Previous Thread: Best practices for storing password?
- Next Thread: Load a file to RichTextBox
Views: 4078 | Replies: 18
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics string table text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






