|
Omit needless local variables.
myList.Add(rgx.Split("D;E;F;G;H"));
|
|
|
|
|
Maybe (expecially if you don't need debugging), anyway it's a matter of taste.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
What's more annoying than people who delete their posts after they are answered ?
I'm not sure either....
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
There shouldn't be a way to delete a post.
|
|
|
|
|
PIEBALDconsult wrote: There shouldn't be a way to delete a post
I agree. Once there has been a reply, the delete link should just disappear..
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Is there any tool or way to compare performance of two statements.
What I generally do is put it in loop and use Timespan to find out the difference.
Is there any better way of doing it? or are there any standard tools available for this?
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Yep, you can use a profiler. I use Ants[^], which works for me (it's not free, but there's a trial available).
Standards are great! Everybody should have one!
|
|
|
|
|
$295
thats a costly affair...i would prefer sticking to my looping way...
but thanks for info...i'll try finding if there are any profilers available for less price..
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
|
I don't think that's that expensive when compared to the amount of time it saves on debugging performance issues. Anyway: The way things are with the dollar right now that's only 187 euros for me .
Standards are great! Everybody should have one!
|
|
|
|
|
just found out ...our company have licenses for http://memprofiler.com/Default.aspx[^]
but it doesnt provide Line-level timings to find out bottle necks...what I am looking for
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Not seen that before. Looks quite nice in principle. Does it work well?
Regards,
Rob Philpott.
|
|
|
|
|
Works very nicely. The only problem with it is that is has trouble monitoring WaitHandle and Thread.Join types of statements: It displays actual time as opposed to CPU time. I've been ensured they'll fix this, and if you know about it, this isn't much of problem anyway.
Standards are great! Everybody should have one!
|
|
|
|
|
Cool! I might have to download the evaluation version and have a play.
Regards,
Rob Philpott.
|
|
|
|
|
|
Hi
If I want to convert a string with one value to a string array. will it be possible?
string[] pubId = new string[10];
pubId = (string[]) pubIds; (here pubIds is a string)
thanks in advance,
ArunaG
|
|
|
|
|
Not Sure what you are trying to achieve here...
If you want to insert pubIds string in array you can use
pubId[i] = pubIds; //i would be the location in array..
if you want to split string in to n no. of strings for array use a splitter.
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Don't repeat the question. You already asked, give people a chance to answer the first post.
only two letters away from being an asset
|
|
|
|
|
Hi
Mark Nischalke, sorry for repeating posts. I re-posted my msg in the other post. (now deleted it!!)
Phannon, to use the already provided info. in this case, the string contains only one value
for example pubIds ="23fg437"
I want to convert this value to string array.
previous post meant with pubIds ="23fg437, 2673jnk, 78562jd" ( that means i have to work with multiple values separates by commas and single value without commas.For multiple values Iam spliting and converting to string[] but I dont understand how to convert a string value to string[].
Any Idea please!!
thanks,
Aruna.G
|
|
|
|
|
|
A string is already an array of chars. If you want to assign a string value to an element in an array, just do it, nothing complicated. Why do you think it is so difficult?
string hello = "Hello";<br />
string world = "World";<br />
string[] myStrings = new string[2];<br />
myStrings[0] = hello;<br />
myStrings[1] = world;
only two letters away from being an asset
|
|
|
|
|
Use the info you have already been provided.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Hi guys,
I'm building a simple application similar to MS Paint and I want to be able to save any drawning, for wich I use Bitmap.Save(...). I also want to be able to let user specify the size and units of rendered outcome (px, mm, inch...) To be able to create a bitmap in different size units than pixel, I need to convert the units into the pixel first, then create the bitmap of specified size (in px) , then create graphics from my bitmap and render the screen into the graphics and save the bitmap.
so my question is, if youse choose 20x20 mm , how can I convert this into px. Is there any framework class that exposes this functionality so I can use it? I'm sure they have to do it as well .
thank you
zilo
|
|
|
|
|
Search MSDN for DpiX, DpiY methods, their names look promising.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi all,
My main application form is entirely populated by a tab-based user-interface. Looks nice.
Every now and then I need to display warnings, errors or progress windows, for which I use MessageBox or custom progress display forms. The problem I have is that when I minimize my main window or activate a different application from the taskbar, my messagebox or progress window stays on top.
1. I'd like to display progress forms to my main form as MDI children, have tried so, but they don't display. I suspect this is because the mainform is populated with controls already. Suggestions? Example code for the progress window's constructor:
public ProgressWindow()
{
InitializeComponent();
this.MdiParent = Static.FormsPool.GetForm(Formnames.MainForm);
this.TopMost = true;
}
2. The MessageBox dialogs should act as mdi children too. As far as I know there's no way to accomplish this, but I sure hope so.
Thanks in advance!
Standards are great! Everybody should have one!
|
|
|
|