|
preetej wrote: atleast tell me how to write 5 aguments in the method.
Wow - do you know how to program at all ?
void method( int i1, int i2)
ths metod has 2 arguments.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
I don't think that's what he meant to say. He wants to write a custom rule that yells at you if you create a method with 5 or more parameters.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
I took it to mean that at the end he said he doesn't even know what the rule means. It's clear he doesn't know much about programming in general from his responses.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
|
sorry i m new to programming so only i m in need help of you people.i dont know to program that good.
|
|
|
|
|
Not sure what you are wanting, but if you mean you want to check to see if a .cs file has any methods with more than 5 parameters, it shouldn't be that hard. Open the file, parse it out for methods, count the parameters.
Is this your first project?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
ya this is my 1 st project so i m confused like what to do
|
|
|
|
|
s this is my first assignment in the company
|
|
|
|
|
I wrote some FxCop rules last year, and if i remember it correct you should override the
Problem[] Check(Method myFooBarMethod2k) ... there should be some kind of parameter list in myFooBarMethod2k that you can use
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
Hi User Codeprovider in .net check method information with runtime
for more information please check in msdn.
|
|
|
|
|
|
|
Limiting the number of parameters to methods seems like an odd idea.
However, I think some clarification is needed; by the '{0}' in the subject, do you mean limiting the number of parameters passed to things like string.Format and Console.WriteLine ?
|
|
|
|
|
Is it at all possible to install Visual C# Express Edition in your computer without having admin rights?
|
|
|
|
|
I doubt it.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Yes, you just need to have enough rights to install. You don't have to be an administrator to install, several other roles have the ability. You just need to lowest one that has install rights...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Power User might be able to do it, but I haven't tried it myself.
|
|
|
|
|
Nope. Power User doesn't do it. Sighs...
|
|
|
|
|
Hello,
I have a weird problem with my c# code. It works fine on my pc sempron 1600+ but it cracks on dual core processors.
I have two classes (the main form, and one that implements some change to an image). I want to show the change in real time on the form on a picture box. So I created a thread and use delegates and beginInvoke method to refresh the pictureBox after I changed some pixels of the image that I display there.
The application works fine on low speed processors but on dual core or processor with 2ghz+ it cracks, it put the processor on 100% and does not make any changes to the pictureBox. Also I putted some breakpoints and I was stupefied, the application enters the section that changed the pixels, enters the delegate function that refresh the panel but it doesn't make any changes... I have not clue what I done wrong.
Note: I tried the Invoke method too but it the same problem.
I'm open to any suggestions
Thanks
Edit add some code
The delegates
<br />
public delegate void DelegatePictureBoxUpdate();<br />
public delegate void DelegatePictureBoxLoad(Bitmap image, int nr);<br />
public delegate void DelegateActualizareStatus();<br />
public delegate void DelegateActualizareFinal();<br />
<br />
Thread fir;<br />
ManualResetEvent m_EventStopThread;<br />
ManualResetEvent m_EventThreadStopped;<br />
<br />
public DelegatePictureBoxUpdate m_DelegatePictureBoxUpdate;<br />
public DelegatePictureBoxLoad m_DelegatePictureBoxLoad;<br />
public DelegateActualizareStatus m_DelegateStatus;<br />
public DelegateActualizareFinal m_DelegateFinal;<br />
<br />
The delegate function that loads and refresh the pctBox
<br />
public void LoadPictureBox(Bitmap final, int nr)<br />
{<br />
progressInpaint.Maximum=nr;<br />
progressInpaint.Step= nr/20;<br />
pctBoxReparat.Image=final;<br />
lblProprietati.Enabled=true;<br />
lblProprietati.Text+=":"+nr.ToString();<br />
}<br />
public void UpdateStatus()<br />
{<br />
progressInpaint.Value+=progressInpaint.Step;<br />
progressInpaint.Refresh();<br />
}<br />
<br />
void MainFormFormClosed(object sender, FormClosedEventArgs e)<br />
{<br />
<br />
if ( fir!= null && fir.IsAlive )
{<br />
m_EventStopThread.Set();<br />
<br />
while (fir.IsAlive)<br />
{<br />
if ( WaitHandle.WaitAll(<br />
(new ManualResetEvent[] {m_EventThreadStopped}), <br />
100,<br />
true) )<br />
{<br />
break;<br />
}<br />
<br />
Application.DoEvents();<br />
}<br />
}<br />
}<br />
The code in the other class:
<br />
m_form.BeginInvoke(m_form.m_DelegatePictureBoxLoad, new Object[] {final, nrPuncteDeterioate});<br />
<br />
<br />
m_form.BeginInvoke(m_form.m_DelegatePictureBoxUpdate,null);<br />
<br />
m_EventStopped.Set();<br />
modified on Wednesday, April 16, 2008 3:45 AM
|
|
|
|
|
Using some breakpoints to debug threading issues is not the best idea. If you could demonstrate what you have done maybe we can help you.
|
|
|
|
|
Hi,
I want to pass value of textbox1 that is in form1 to form2.
Thanks
|
|
|
|
|
What have you done? How are you trying to accomplish?
(delegates)
|
|
|
|
|
expose a property in the form that has the texbox and call it from the other form when you need it
public string TextBox_text
{
get{return textbox1.Text;}
}
|
|
|
|
|
Both answers you've got are good ( delegates are better ), but I will point out if you'd bothered to search the site, there is at least one excellent article on how to do this.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Can u write down whether you are working on web forms or window forms?
Sarvesh Upadhyay
Senior Software Engineer
Birlasoft India Ltd.
Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
|
|
|
|