Click here to Skip to main content
15,899,124 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 4:59
hoernchenmeister2-Aug-10 4:59 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
PIEBALDconsult2-Aug-10 12:28
mvePIEBALDconsult2-Aug-10 12:28 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 20:29
hoernchenmeister2-Aug-10 20:29 
AnswerRe: Reflection to load an assembly application wide (like referencing it) Pin
Bernhard Hiller1-Aug-10 22:01
Bernhard Hiller1-Aug-10 22:01 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 1:20
hoernchenmeister2-Aug-10 1:20 
QuestionUpperBound of Dynamic array Pin
Enobong Adahada29-Jul-10 22:36
Enobong Adahada29-Jul-10 22:36 
AnswerRe: UpperBound of Dynamic array Pin
Sathesh Sakthivel29-Jul-10 23:35
Sathesh Sakthivel29-Jul-10 23:35 
AnswerRe: UpperBound of Dynamic array Pin
OriginalGriff29-Jul-10 23:43
mveOriginalGriff29-Jul-10 23:43 
You can find how many elements are in an array with the Length property.

C# doesn't have dynamic arrays - they are all fixed when you declare them, but you can fake it by creating a new array and copying the old elements to it. This is not a dynamic array however, as only the references you specifically change have the new size.
int[] orig = new int[] { 1, 2, 3, 4, 5, 6 };
int[] copy = orig;
int[] temp = new int[10];
for (int i = 0; i < copy.Length; i++)
    {
    temp[i] = copy[i];
    }
copy = temp;
"copy" now refers to an array of ints with ten elements, but "orig" tsill referes to an array of six.

If you want a dynamic array like structure, you would be better off using a List<T> which has a ToArray method if you need it.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

GeneralRe: UpperBound of Dynamic array Pin
riced30-Jul-10 0:29
riced30-Jul-10 0:29 
GeneralRe: UpperBound of Dynamic array Pin
OriginalGriff30-Jul-10 0:33
mveOriginalGriff30-Jul-10 0:33 
GeneralRe: UpperBound of Dynamic array Pin
Keith Barrow30-Jul-10 0:49
professionalKeith Barrow30-Jul-10 0:49 
GeneralRe: UpperBound of Dynamic array Pin
Enobong Adahada2-Aug-10 8:11
Enobong Adahada2-Aug-10 8:11 
AnswerRe: UpperBound of Dynamic array Pin
PIEBALDconsult30-Jul-10 6:08
mvePIEBALDconsult30-Jul-10 6:08 
GeneralRe: UpperBound of Dynamic array Pin
riced30-Jul-10 6:11
riced30-Jul-10 6:11 
QuestionProblem updating data in an MSSQL database Pin
aneuby29-Jul-10 21:57
aneuby29-Jul-10 21:57 
AnswerRe: Problem updating data in an MSSQL database Pin
aneuby29-Jul-10 22:31
aneuby29-Jul-10 22:31 
QuestionBind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 21:15
SatyaKeerthi1529-Jul-10 21:15 
AnswerRe: Bind Binary data to Gridview Pin
Arun Jacob29-Jul-10 21:28
Arun Jacob29-Jul-10 21:28 
GeneralRe: Bind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 21:30
SatyaKeerthi1529-Jul-10 21:30 
GeneralRe: Bind Binary data to Gridview Pin
Mycroft Holmes29-Jul-10 22:14
professionalMycroft Holmes29-Jul-10 22:14 
GeneralRe: Bind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 23:55
SatyaKeerthi1529-Jul-10 23:55 
QuestionPublishing Update problem Pin
kbalias29-Jul-10 19:40
kbalias29-Jul-10 19:40 
AnswerRe: Publishing Update problem Pin
Richard MacCutchan29-Jul-10 22:36
mveRichard MacCutchan29-Jul-10 22:36 
QuestionHow to add multiple components (texboxes,compoboxbutton etc...) to a listview Pin
aneesh kumar k29-Jul-10 18:32
aneesh kumar k29-Jul-10 18:32 
AnswerRe: How to add multiple components (texboxes,compoboxbutton etc...) to a listview Pin
Mycroft Holmes29-Jul-10 20:55
professionalMycroft Holmes29-Jul-10 20:55 

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.