|
The veggie ones go for the nut cutlass.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
Surely, if they drop it on the desk it'll taste shippy. Even worse should it happen on the poop-deck. That sail I'll say on the matter.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Eat 'arrhty, maties!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Do Ja make a casserole in it?
I do all my own stunts, but never intentionally!
JaxCoder.com
|
|
|
|
|
OriginalGriff wrote: buccaneer
That is expensive corn.
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
but in fairness I can think of one good thing about 2019 release: 2017 should become more stable.
no, not so much fixing the problems it has (many inherited from prev versions),
but no more introduction of new crap/bloat a lot of which really wasn't that useful bugs
Message Signature
(Click to edit ->)
|
|
|
|
|
|
Perfect. That'll be stuck in my head until next Tuesday.
cheers
Chris Maunder
|
|
|
|
|
Beats the Polynesian tam-tam (and sitting in a cooking pot)
|
|
|
|
|
Just written some code which needed converting an array to a string and back, and was like WTF.
to split a string into an array
var joined_str = String.Join(",", my_array);
cool.
To split a string into array:
var my_array = joined_str.Split(',');
Split only really wants a char, and Join only wants a string.
Why can't this two things not get along.
Maybe just me and some outof date c#.net
|
|
|
|
|
You can write an extension method for split that calls join to hide the nastiness, and always call split from then on.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I was just about to write the exact same message.
cheers
Chris Maunder
|
|
|
|
|
I had never used Join before, and after looking it up, it doesn't do the same thing as split, so my original response is crap. Join concatenates strings together, while split breaks a string up based on a delimiter character.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
No, it's just that it's more complicated to split on a string, i think, but easy to join on whatever.
I wrote some methods for doing it, if you want them i'll share them.
They're also intended for splitting on word breaks
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
maze3 wrote: Split only really wants a char, and Join only wants a string.
Usually splitting a string by just a char makes sense, however you should look at the method signature, it's actually not a char :
public String[] Split(params char[] separator);
(One of several array overloads)
Joining by a string makes tons of sense. For example, joining by CRLF.
Latest Article - Azure Function - Compute Pi Stress Test
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
maze3 wrote: var joined_str
maze3 wrote: var my_array
You don't mention why those two don't work well together, but could that overused three letter keyword be what obscures the actual problem?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
BTW, I have a persistent string parser article I wrote in 2008. It might give to a starting point for rolling your own code. Keep in mind that I wrote this when I was just starting out in .Net, so refactoring it might be a good call.
Persistent String Parser[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I am struggling to understand why you need to convert array to string, and then back to array?
|
|
|
|
|
To be sure, to be sure...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hahaha,
I should have pointed out me simply ranting.
10 second model/viewmodel with conversion of an old property.
"oh, but why not use auto models framework XX YY, that does this with an attribute tag MM!"
Life.
|
|
|
|
|
musefan wrote: I am struggling to understand why you need to convert array to string, and then back to array?
It's talking to a COBOL service.
Latest Article - Azure Function - Compute Pi Stress Test
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
maze3 wrote: Split only really wants a char, Not sure what you mean by "only really". It also accepts an array of char separators. But I wish it also had an overload that accepted a string that was interpreted as a set of char s. It's much easier to type.
/ravi
|
|
|
|
|
Am I missing something? There's an overload, albeit an ugly one:
string s = "Rob and Bob and Clob";
var z = s.Split(new[] {" and "}, StringSplitOptions.None);
Regards,
Rob Philpott.
|
|
|
|
|
vs_enterprise__1772378612.1554282312.exe --layout "A:\VS2019" == 24.7 GB
next to see if can install
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
give it time. soon the install will be 2 TB and will cause your machine to physically explode,causing a rip in the space time continuum.
|
|
|
|