Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: Printing Quality Image Vs Text Pin
Luc Pattyn16-Jun-10 2:25
sitebuilderLuc Pattyn16-Jun-10 2:25 
QuestionWhich is better and why? Pin
Hum Dum15-Jun-10 22:53
Hum Dum15-Jun-10 22:53 
AnswerRe: Which is better and why? Pin
Bigdeak15-Jun-10 23:22
Bigdeak15-Jun-10 23:22 
GeneralRe: Which is better and why? Pin
Hum Dum16-Jun-10 0:31
Hum Dum16-Jun-10 0:31 
AnswerRe: Which is better and why? Pin
Abhinav S16-Jun-10 0:36
Abhinav S16-Jun-10 0:36 
AnswerRe: Which is better and why? Pin
Eddy Vluggen16-Jun-10 1:15
professionalEddy Vluggen16-Jun-10 1:15 
AnswerRe: Which is better and why? Pin
PIEBALDconsult16-Jun-10 3:06
mvePIEBALDconsult16-Jun-10 3:06 
AnswerNeither approach is appropriate Pin
Ennis Ray Lynch, Jr.16-Jun-10 6:14
Ennis Ray Lynch, Jr.16-Jun-10 6:14 
Here is an itemized list of reasons why:

1) Try to avoid using reference parameters. While they have a purpose they are difficult to maintain across developer experience levels and expectations.
2) Try to avoid using members as global variables. You introduce a lot of state into your objects that can be difficult to manage.
3) checkValue is misspelled. No matter which naming convention you use BE CONSISTENT! Your method should have been named CheckValue and yes it is an important distinction since checkValue tells experienced c# developers they are looking for a local variable.
4) CheckValue is a poor method name. Methods must be aptly named or chaos will ensue.
5) Your two samples actually have different results! See if you can find it.
6) Never use implicit scope.
7) I would provide a good example of how to do what you are asking, however, you code offers no clue as to the intent so the purpose of the question cannot even be inferred. However, I would suggest:

private DataRow CreateNewRow(DataTable table);
private bool IsDataRowValid(DataRow row);
private DataTable LoadDataTable();
private string CalculateSomeImportantDataFromRow(DataRow row);


Although, I personally would be using classes to represent my data instead of DataTables or Strongly typed data tables so my above suggestions do not take into account the "best" approach. Also, keep in mind, other than the CreateNewRow method no other method I described would have any side effects.

Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.

A man said to the universe:
"Sir I exist!"
"However," replied the universe,
"The fact has not created in me
A sense of obligation."
--Stephen Crane


GeneralRe: Neither approach is appropriate Pin
Hum Dum16-Jun-10 17:49
Hum Dum16-Jun-10 17:49 
GeneralRe: Neither approach is appropriate Pin
Ennis Ray Lynch, Jr.17-Jun-10 5:19
Ennis Ray Lynch, Jr.17-Jun-10 5:19 
Questionc++ dll in C# Pin
kk.tvm15-Jun-10 22:49
kk.tvm15-Jun-10 22:49 
AnswerRe: c++ dll in C# Pin
Pete O'Hanlon15-Jun-10 22:58
mvePete O'Hanlon15-Jun-10 22:58 
GeneralRe: c++ dll in C# Pin
kk.tvm15-Jun-10 23:15
kk.tvm15-Jun-10 23:15 
GeneralRe: c++ dll in C# Pin
Pete O'Hanlon15-Jun-10 23:39
mvePete O'Hanlon15-Jun-10 23:39 
Questionhow to create your own skin for win forms Pin
jainiraj15-Jun-10 22:48
jainiraj15-Jun-10 22:48 
AnswerRe: how to create your own skin for win forms Pin
Bigdeak15-Jun-10 23:30
Bigdeak15-Jun-10 23:30 
GeneralRe: how to create your own skin for win forms Pin
jainiraj15-Jun-10 23:31
jainiraj15-Jun-10 23:31 
GeneralRe: how to create your own skin for win forms Pin
Johnny J.16-Jun-10 0:47
professionalJohnny J.16-Jun-10 0:47 
GeneralRe: how to create your own skin for win forms Pin
Bigdeak16-Jun-10 1:38
Bigdeak16-Jun-10 1:38 
GeneralRe: how to create your own skin for win forms Pin
Johnny J.16-Jun-10 1:48
professionalJohnny J.16-Jun-10 1:48 
GeneralRe: how to create your own skin for win forms Pin
Bigdeak16-Jun-10 2:23
Bigdeak16-Jun-10 2:23 
AnswerRe: how to create your own skin for win forms Pin
Pete O'Hanlon15-Jun-10 23:42
mvePete O'Hanlon15-Jun-10 23:42 
GeneralRe: how to create your own skin for win forms Pin
jainiraj16-Jun-10 0:03
jainiraj16-Jun-10 0:03 
GeneralRe: how to create your own skin for win forms Pin
Pete O'Hanlon16-Jun-10 0:47
mvePete O'Hanlon16-Jun-10 0:47 
GeneralRe: how to create your own skin for win forms Pin
Johnny J.16-Jun-10 1:18
professionalJohnny J.16-Jun-10 1:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.