|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
".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
|
|
|
|
|
Dolor indeed!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
I think I laughed too hard on this.
|
|
|
|
|
Quote: dolor in reprehenderit in voluptate In fact!
He just wants to find pleasure!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Possibly see your dentist who's better trained in such matters.
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 |
|
|
|
|
|
public static IEnumerable<IList<T>> Split<T>(this IEnumerable<T> collection,T delim,IEqualityComparer<T> equalityComparer = null)
public static IEnumerable<T> Join<T>(this IEnumerable<IList<T>> segments, IEnumerable<T> delim)
public static IEnumerable<T> Replace<T>(this IEnumerable<T> collection,T oldValue, IEnumerable<T> newValues, IEqualityComparer<T> equalityComparer = null)
Guess I could use LINQ but nah.
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.
|
|
|
|
|
A small consolation maybe, you can use aliases like this:
using MyDictionary = Dictionary<string, List<int>>;
|
|
|
|
|
You can't do like
using MyDict<TValue>=IDictionary<string,TValue>;
so it's of little help to me in this. I really wish .NET had something as flexible as C++'s typedef
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.
|
|
|
|
|
|
If only because I have built this code up over years, I'm sticking with C# (there's a lot more than this)
I just think this one's funny because it's Split/Join/Replace like for System.String but with collections. I actually *needed* that.
Parser construction is weird.
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.
|
|
|
|
|
Use the tools you've been given.
# define MyDict(x) System.Collections.Generic.IDictionary<string,x>
namespace Smartassery
{
public static partial class Supreme
{
public static void
Main
(
)
{
System.Console.WriteLine ( typeof ( MyDict(int) ) ) ;
return ;
}
}
}
cl.exe /C /EP /P MyDictTest.cs
csc.exe MyDictTest.i
|
|
|
|
|
now that's just hateful.
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.
|
|
|
|
|
I fail to see the problem...
var myList = new List<SOMETHING>();
var aValue = GetSplitValue();
var result = myList.Join(otherlist).Split(aValue).ToList();
What's wrong with that?
|
|
|
|
|
the fact that i had to write those
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.
|
|
|
|
|
ha.. no biggie!
err... I feel so sorry with you!
|
|
|
|
|
I feel quite weary as well, look what I had to write myself too!
Sigh, such burden...
public static IEnumerable<T> Enumerate<T>(this T item, Func<T, T> getNext)
{
while (item != null)
{
yield return item;
item = getNext(item);
}
}
|
|
|
|
|
If you have something serious to say, why not start a thread in the C# language forum.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
If not, the Lounge will do fine.
Seriously, I prefer these harmless rants over a lot of the other crap we get in the forums.
|
|
|
|
|
agree… upvoted
|
|
|
|
|
codewitch honey crisis wrote: Guess I could use LINQ but nah.
Anything serious you wanna inform us about?
Rules for the FOSW ![ ^]
if(!string.IsNullOrWhiteSpace(_signature))
{
MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
not especially
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.
|
|
|
|
|
Serious? This is The Lounge. We don't do "serious" here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Assuming the OP has something on their mind of a technical nature in posting, I call that serious, and I think the topic (assuming the OP intends to do more than strike poses) just might lead to a fruitful discussion in the C# language forum ... which, once upon a time, was not just another QA for endless series of questions by newbs, and desperadoes who need their feet pulled out of the fire
Of course, for me, the C# forum is often redeemed by the quality of responses by you, OG, MacCutchan, Patyn, Hillier, Vluggen, SuperLloyd, and (alas too rarely, these days) O'Hanlon, Clifton
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
modified 17-May-19 8:25am.
|
|
|
|
|
Nope. No technical questions. It wasn't a question at all. Just a goofy look at the sort of code i end up writing in imperative languages. Like Split/Join/Replace that operates on collections.
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.
|
|
|
|
|
You are right
Rules for the FOSW ![ ^]
if(!string.IsNullOrWhiteSpace(_signature))
{
MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|