Click here to Skip to main content
15,889,795 members
Home / Discussions / C#
   

C#

 
Generalsimple unicode conversion Pin
Anonymous12-Aug-03 23:53
Anonymous12-Aug-03 23:53 
GeneralRe: simple unicode conversion Pin
Nnamdi Onyeyiri13-Aug-03 0:40
Nnamdi Onyeyiri13-Aug-03 0:40 
GeneralA RAY Pin
eggie512-Aug-03 22:36
eggie512-Aug-03 22:36 
GeneralRe: A RAY Pin
J. Dunlap12-Aug-03 22:54
J. Dunlap12-Aug-03 22:54 
GeneralRe: A RAY Pin
eggie513-Aug-03 13:31
eggie513-Aug-03 13:31 
GeneralRe: A RAY Pin
Nnamdi Onyeyiri13-Aug-03 0:45
Nnamdi Onyeyiri13-Aug-03 0:45 
GeneralRe: A RAY Pin
eggie513-Aug-03 13:31
eggie513-Aug-03 13:31 
GeneralRe: A RAY Pin
James T. Johnson13-Aug-03 9:20
James T. Johnson13-Aug-03 9:20 
There are two different ways of interpreting what you write:

1) You know the size of the array at runtime, but not at compile time.

public int [] CreateArray(int size)
{
  int [] array = new int[size];
 
  return array;
}
The second method is when you don't know ahead of time how many elements you'll need. This typically happens when you are dealing with data being input by the user.

public int[] CreateArray()
{
  string input = "";
  ArrayList alist = new ArrayList();
 
  Console.WriteLine("Enter a number then press enter, to quit just press enter");

  while("" != (input = Console.ReadLine()) )
  {
    int i;

    try
    {
      i = int.Parse(input);
    }
    catch
    {
      Console.WriteLine("\"{0}\" is not a valid input number, try again",
        input);
      continue;
    }
 
    alist.Add(i);
  }
 
  return (int[]) alist.ToArray(typeof(int));
}
All code has not been compiled so errors my exist

James

"My words but a whisper -- your deafness a SHOUT.
I may make you feel but I can't make you think.
" - Thick as a Brick, Jethro Tull 1972

GeneralRe: A RAY Pin
eggie513-Aug-03 13:31
eggie513-Aug-03 13:31 
GeneralRe: A RAY Pin
eggie53-Jan-04 17:32
eggie53-Jan-04 17:32 
GeneralTreeview embedded in a listview Pin
Ista12-Aug-03 18:34
Ista12-Aug-03 18:34 
GeneralRe: Treeview embedded in a listview Pin
Furty12-Aug-03 22:02
Furty12-Aug-03 22:02 
QuestionWho knows what I need to install in the client system to run a C# application? Pin
yboc12-Aug-03 18:22
yboc12-Aug-03 18:22 
AnswerRe: Who knows what I need to install in the client system to run a C# application? Pin
Furty12-Aug-03 22:11
Furty12-Aug-03 22:11 
GeneralRe: Who knows what I need to install in the client system to run a C# application? Pin
yboc13-Aug-03 17:14
yboc13-Aug-03 17:14 
QuestionHow to have sub-properties in a custom control? Pin
Alvaro Mendez12-Aug-03 16:09
Alvaro Mendez12-Aug-03 16:09 
AnswerRe: How to have sub-properties in a custom control? Pin
J. Dunlap12-Aug-03 16:43
J. Dunlap12-Aug-03 16:43 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:15
Alvaro Mendez13-Aug-03 5:15 
AnswerRe: How to have sub-properties in a custom control? Pin
Nick Parker12-Aug-03 18:27
protectorNick Parker12-Aug-03 18:27 
GeneralRe: How to have sub-properties in a custom control? Pin
Meysam Mahfouzi12-Aug-03 19:49
Meysam Mahfouzi12-Aug-03 19:49 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 1:45
protectorNick Parker13-Aug-03 1:45 
GeneralRe: How to have sub-properties in a custom control? Pin
Arjan Einbu13-Aug-03 5:11
Arjan Einbu13-Aug-03 5:11 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 5:33
protectorNick Parker13-Aug-03 5:33 
GeneralRe: How to have sub-properties in a custom control? Pin
Alvaro Mendez13-Aug-03 5:23
Alvaro Mendez13-Aug-03 5:23 
GeneralRe: How to have sub-properties in a custom control? Pin
Nick Parker13-Aug-03 5:35
protectorNick Parker13-Aug-03 5:35 

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.