Fine, I'll jump on the "I hate Microsoft" bandwagon
-
So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:
There are only 10 types of people in the world, those who understand binary and those who don't.
-
So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:
There are only 10 types of people in the world, those who understand binary and those who don't.
You have to start to build your own - fixed - library of extension methods...
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:
There are only 10 types of people in the world, those who understand binary and those who don't.
-
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.
-
So, C# has no left method on a string? :omg: :omg: It would be so easy to add one, lazy Microsoft C# developers. So, use substring. Whoops. Nope. Errors if you give it a length that is longer than the string. I miss VB. :sigh:
There are only 10 types of people in the world, those who understand binary and those who don't.
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); }
-
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. :mad: 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.
-
You have to start to build your own - fixed - library of extension methods...
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Yup. Phones getting bigger, having to press a button to see the time on your watch, having to write your own extensions... The seventies are back, for certain.
I wanna be a eunuchs developer! Pass me a bread knife!
-
Don't give me workarounds when all I want to do is complain. :mad: 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. :-)
-
Don't give me workarounds when all I want to do is complain. :mad: 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.
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!
-
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!
-
Yup. Phones getting bigger, having to press a button to see the time on your watch, having to write your own extensions... The seventies are back, for certain.
I wanna be a eunuchs developer! Pass me a bread knife!
Ecclesiastes 1, 9:
That which hath been is that which shall be, and that which hath been done is that which shall be done; and there is nothing new under the sun.
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
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.
-
Ecclesiastes 1, 9:
That which hath been is that which shall be, and that which hath been done is that which shall be done; and there is nothing new under the sun.
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Is there a chapter and verse that gives a get-out from wearing flares and an afro?
I wanna be a eunuchs developer! Pass me a bread knife!
-
-
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!
-
Guys, you are aware that features are unimplemented by default[^], right?
-- "My software never has bugs. It just develops random features."
But it was implemented. I'm now recompiling everything I've ever written in C#, to insert workarounds. It's a very happy job, as I'm sure you can imagine.
I wanna be a eunuchs developer! Pass me a bread knife!
-
Yup. Phones getting bigger, having to press a button to see the time on your watch, having to write your own extensions... The seventies are back, for certain.
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 StringOn 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!
-
Quote:
The seventies are back, for certain.
Except for the music! There is no music anymore! X|
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!