Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
Questionincluding undefined data in a .net exe?? Pin
Paolo Ponzano22-Apr-04 19:01
Paolo Ponzano22-Apr-04 19:01 
AnswerRe: including undefined data in a .net exe?? Pin
Corinna John22-Apr-04 20:42
Corinna John22-Apr-04 20:42 
GeneralRe: including undefined data in a .net exe?? Pin
Paolo Ponzano23-Apr-04 6:54
Paolo Ponzano23-Apr-04 6:54 
GeneralRe: including undefined data in a .net exe?? Pin
Corinna John23-Apr-04 7:54
Corinna John23-Apr-04 7:54 
GeneralRe: including undefined data in a .net exe?? Pin
Paolo Ponzano23-Apr-04 7:56
Paolo Ponzano23-Apr-04 7:56 
GeneralRe: including undefined data in a .net exe?? Pin
Paolo Ponzano23-Apr-04 21:21
Paolo Ponzano23-Apr-04 21:21 
GeneralRe: including undefined data in a .net exe?? Pin
Corinna John24-Apr-04 8:19
Corinna John24-Apr-04 8:19 
QuestionHow to convert a number to a string Pin
karied22-Apr-04 17:24
karied22-Apr-04 17:24 
AnswerRe: How to convert a number to a string Pin
Jay Shankar22-Apr-04 22:01
Jay Shankar22-Apr-04 22:01 
AnswerRe: How to convert a number to a string Pin
Dave Kreskowiak23-Apr-04 0:30
mveDave Kreskowiak23-Apr-04 0:30 
AnswerRe: How to convert a number to a string Pin
Ryzhiy23-Apr-04 1:38
Ryzhiy23-Apr-04 1:38 
AnswerRe: How to convert a number to a string Pin
Heath Stewart23-Apr-04 2:43
protectorHeath Stewart23-Apr-04 2:43 
QuestionUndo Redo option? Pin
azusakt22-Apr-04 16:02
azusakt22-Apr-04 16:02 
AnswerRe: Undo Redo option? Pin
Christian Graus22-Apr-04 16:14
protectorChristian Graus22-Apr-04 16:14 
GeneralRe: Undo Redo option? Pin
azusakt22-Apr-04 16:24
azusakt22-Apr-04 16:24 
GeneralRe: Undo Redo option? Pin
Christian Graus22-Apr-04 16:27
protectorChristian Graus22-Apr-04 16:27 
GeneralRe: Undo Redo option? Pin
azusakt22-Apr-04 16:40
azusakt22-Apr-04 16:40 
GeneralRe: Undo Redo option? Pin
Christian Graus22-Apr-04 16:45
protectorChristian Graus22-Apr-04 16:45 
GeneralRe: Undo Redo option? Pin
«_Superman_»22-Apr-04 23:43
professional«_Superman_»22-Apr-04 23:43 
AnswerRe: Undo Redo option? Pin
Heath Stewart23-Apr-04 2:48
protectorHeath Stewart23-Apr-04 2:48 
Generalconvert C# code to FORTRAN 95 Pin
jackconnolly22-Apr-04 16:01
jackconnolly22-Apr-04 16:01 
GeneralRe: convert C# code to FORTRAN 95 Pin
hammackj22-Apr-04 17:16
hammackj22-Apr-04 17:16 
GeneralRe: convert C# code to FORTRAN 95 Pin
Dave Kreskowiak23-Apr-04 0:35
mveDave Kreskowiak23-Apr-04 0:35 
Generalsscanf in c# / passing variable number of arguments Pin
Anonymous22-Apr-04 14:31
Anonymous22-Apr-04 14:31 
GeneralRe: sscanf in c# / passing variable number of arguments Pin
Heath Stewart23-Apr-04 2:54
protectorHeath Stewart23-Apr-04 2:54 
String formatting like this is already supported in the .NET Framework. See my article, Custom String Formatting in .NET[^], for reasons why it is much better (also see the message board at the bottom) and ways to use methods like String.Format, Console.WriteLine (any TextWriter.WriteLine, actually), and StringBuilder.AppendFormat, as well as IFormattable implementations' ToString(String, IFormatProvider) methods.

The problem here, though, is that you're passing value types which are pass by value unless you use the ref keyword when passing them and in your method declaration. Since you're passing them in an array, you can't do this, though. They really don't need to be passed by reference, though - you're not changing them. Value types are allocated on the stack instead of the heap because it's more efficient (among other reasons, which are discussed throughout the .NET Framework SDK documentation and online).

 

Microsoft MVP, Visual C#
My Articles

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.