|
It's probably just you simplifying it for the question, but why are you calling the method with three parameters, when it only takes one?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I was just trying to illustrate the way I was trying to use the construct. If I instantiate it BEFORE calling the method, everything is fine. If I instantiate it in the call to the method (as I showed), it fails. I can't instantiate it before calling the method because I'm calling it in a MVC view.
While we're batting this around, I've gone ahead and created a series of classes that support the desire parameters. This is part of my over-arching effort to over-engineer some extension methods.
".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
|
|
|
|
|
Like many, many things in the ASP.NET world, this is handled via reflection on the back end.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
|
Richard Deeming wrote: If you just want to use the same behaviour, the simplest option is to call the helper method.
In my world (either by design or by happenstance), it's almost never a case of "just simply".
".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
|
|
|
|
|
hi all
can anybody suggest me how to clear file folder search on computer?
please help me from where i can start?
thanks in advance.
|
|
|
|
|
If you mean the search history in Explorer: How to Delete the Search History in Windows File Explorer[^] - but this is not a "help me with my computer" site: please ask development related question here in future.
If you don't, then I have no idea what you do mean, and you need to explain in a lot better detail: remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
No no he only wants to clear the search thingy. Pop it open and use whiteout.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Where to start? ... How about formulating your question better? Did you mean "Search" or "Indexing"? Or?
Or is this your Dad's computer; and you're trying to hide your "browsing"?
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Where can I get a monogame implementation of a snooker or pool game? I'm only 3 weeks into learning C# so no complicated answers 😉
|
|
|
|
|
Member 13545375 wrote: no complicated answers
Google.[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Why, oh why didn't I think of that first? Hehehe.
I guess I'll just have to go about it the long way
|
|
|
|
|
You wanted "no complex answer"!
And there are no "simple" answers to simulating pool, snooker, or even billiards. Learning to plan the real game properly at a good quality can absorb huge amounts of your life, because tiny differences cause such massive changes: professional snooker players take years to get to that level, and have to practice 5 ~ 6 hours a day, 6 days a week to maintain, let alone improve their skills.
Simulating that? Not a trivial subject in any way, shape, or form - so there are no "no complex answers" other than "go to Google, and it will serve up some of the complicated ones".
Seriously, this isn't a task for a beginner - I wouldn't want to try it on my own and I've been coding for 30+ years! I'd need a team of developers, designers, and some professionals on standby to get any reasonable results in a workable time frame of 2 ~ 3 years. Even then, it probably wouldn't be ready for public release for another year or two after that. It's a big job!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's like saying, "Where can I get a simple diagram of a Formula 1 engine, I have just learned how to assemble a 3-speed gear on my bike". And the issue really is not about C#, it is about the physics of ball trajectories on a pool/snooker table. Spend more (much more) time on some simple projects and learn as many .NET classes as possible first.
|
|
|
|
|
Formula one?!! #Horrified
|
|
|
|
|
Actually that was unfair of me, I have seen the bike taxis in Kasese district; those guys are cool.
|
|
|
|
|
I'm going to go one better and assemble a formula 1 engine from kiseka market spare parts
|
|
|
|
|
Don't forget to post a video of its first test run.
Member 13545375 wrote: kiseka market
We drove past there the day (in 2005) before we flew home, when our buses got stuck in a flood downtown.
|
|
|
|
|
Yeah, that's an area to avoid if you can... The city is almost proud to have it as some sort of "right of passage" for those who dare
|
|
|
|
|
Hello, I am trying to match a substring which contains the percent symbol using REGEX W character but it does not seem to work. Below is what I have so far.
string inputString = @"#Test{border-top:Solid blue 1px; border-bottom:1% solid black;}";
string escapedString = Regex.Escape("border-bottom");
string pattern = escapedString + @"\:\s?\d+\W(\s?\w+)*\;?\s?";
Regex rgx = new Regex(pattern);
Match match = rgx.Match(matchedCss);
string matchedString = match.Value;
Console.WriteLine(matchedString);
Console.ReadLine();
The REGEX pattern above should have matched the substring
border-bottom:1% solid black; but for some reason it did not. Please help me resolve this problem, thanks in advance.
modified 29-Nov-17 21:45pm.
|
|
|
|
|
You don't need to escape the colon maybe?
And probably not the semi-colon either?
And after all the begging I had to do to get Chris to add a Regular Expressions Forum[^] , too. 
|
|
|
|
|
Hi, thanks for your reply. I have updated my pattern by eliminating the back slash in front of the colon and semicolon as you have suggested. However, it still does not work. Below is the updated pattern
pattern = escapedString + @":\s?\d+\W(\s?\w+)*\s?;?\s?";
modified 29-Nov-17 22:35pm.
|
|
|
|
|
It works for
string inputString = @"#Test{border-top:Solid blue 1px; border-bottom:1% solid black;}";
I put the code provided in VS and got:
Error 1 The name 'matchedCss' does not exist in the current context F:\Project\PlayGround\Playground\Form1.cs 757 56 Playground
So, what text are you actually trying to match?
|
|
|
|
|
ehm:
string inputString = @"#Test{border-top:Solid blue 1px; border-bottom:1% solid black;}";
string escapedString = Regex.Escape("border-bottom");
string pattern = escapedString + @"\:\s?\d+\W(\s?\w+)*\;?\s?";
Regex rgx = new Regex(pattern);
Match match = rgx.Match(inputString);
string matchedString = match.Value;
Console.WriteLine(matchedString);
It works for me. At least when I set the inputString to match you expression.
|
|
|
|