Avoid having more than 5 arguments in the Method:'{0}'
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
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 )
-
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.
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
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
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
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
-
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 )
nice explanation
Cheers,Earn and Enjoy RRave MCTS,MCPD http://ravesoft.blogspot.com
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
Hi User Codeprovider in .net check method information with runtime for more information please check in msdn.
Cheers,Earn and Enjoy RRave MCTS,MCPD http://ravesoft.blogspot.com
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
Hi you can check this link http://weblogs.asp.net/pglavich/archive/2005/07/19/419869.aspx[^]
Sarvesh Upadhyay Senior Software Engineer Birlasoft India Ltd. Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
here you can get a working example. http://www.binarycoder.net/fxcop/html/index.html[^]
Sarvesh Upadhyay Senior Software Engineer Birlasoft India Ltd. Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
-
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
-
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 )
-
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
-
hi, i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
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 likestring.Format
andConsole.WriteLine
? -
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 )