|
Quote: The seventies are back, for certain. Except for the music! There is no music anymore!
Get me coffee and no one gets hurt!
|
|
|
|
|
Oh, there is, but the definition of the word "music" has changed to be something to do with money for nothing.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Quote: the definition of the word "music" has changed to be something to do with money for nothing You nailed it! In a few words you nailed it! Modern music is nothing and worth nothing!
Now: How are we going to convince poor souls like Sander that this is true?
Get me coffee and no one gets hurt!
|
|
|
|
|
I'd suggest a 22oz Estwing and a bunch of four-inch nails.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: money for nothing
And chicks for free.
|
|
|
|
|
We've got to install microwave ovens!
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
I found music. I raided my parents Vinyl collection.
Love that warm crackly sound of old LP records.
|
|
|
|
|
RyanDev wrote: Errors if you give it a length that is longer than the string.
As one would jolly well hope it did. I don't see why MS should take stick for your faulty programming logic.
I am not a number. I am a ... no, wait!
|
|
|
|
|
9082365 wrote: As one would jolly well hope it did No way. VB's LEFT function truncated it for you, which is of course what I would want it to do. Oh, so easy.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Well, he did mention VB. Which teaches everyone bad habits.
|
|
|
|
|
Since when is increasing programmer/developer (Whatever the term hipsters are using these days...) "teaching bad habits" ?
|
|
|
|
|
For one, VB teaches its users to take shortcuts.
Like leaving words out of your sentences, and then taking for granted that others will understand what you meant just by context.
|
|
|
|
|
Well it seems to me that documenting your code resolves that issue. AND it is easier and quicker to do, and still more productive.
Bad programmers will always "take shortcuts". Do not blame that on VB, or any other language, for that matter.
The language, any language, doesn't "teach" anything, to a programmer. If you shoot yourself in the foot with a handgun (after completing the required safety training), is it the gun's fault?
VB's problem is that it is not "Hip" anymore. Go listen to Billy Joel's "Still Rock and Roll". It is universally applicable.
What's the matter with the clothes I'm wearing?
"Can't you tell that your tie's too wide?"
Maybe I should buy some old tab collars?
"Welcome back to the age of jive.
|
|
|
|
|
Here you go:
public static string Left(this string theString, int length)
{
int sz = length > theString.Length + 1 ? theString.Length:length;
return theString.Substring(0, sz);
}
|
|
|
|
|
Don't give me workarounds when all I want to do is complain.
I know it's super simple to write one myself, but the point is I should not have to. Seems pretty basic.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Why not just ref the VB assembly and... oh, I can't keep it up.
|
|
|
|
|
|
RyanDev wrote: Don't give me workarounds when all I want to do is complain. i confess that that is something that grandly pisses me off.
RyanDev wrote: I know it's super simple to write one myself, but the point is I should not have to. It's that it was taken away because some moron decided for you that you didn't need it; that's what gets the teeth grinding.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: It's that it was taken away Not sure C# ever had it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Um...[^]
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Um what? Microsoft.VisualBasic. And it's still there.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
On the VB tab, it gives the VB syntax:
Public Shared Function Left (
str As String,
Length As Integer
) As String
On the C# tab, it gives the C# syntax:
public static string Left(
string str,
int Length
)
I know that computery things seem complicated, Granny, but you ought to at least try to use them.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
You're still missing what namespace the function is in.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Don't bother me with petty details when I'm in panic mode!
Looks like I've always used Substring, anyway.
Strange, that. It feels like I've used Left much more recently than I've used VB.
{Insert Sid James comment here]
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|