|
I seriously doubt these controls store the array - the property most likely convert to and from the "native" format when you call the get or set method.
So the solution is to use a collection:
List<string>
|
|
|
|
|
You could store each of your lines in an ArrayList, which autosizes for you when you Add or Remove . As long as you only put strings in there, you can use 1 simple line when you want to assign the lines:
string [] lines = (string[])myArrayList.ToArray(typeof(string));
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
the TextBox controls create a new string[] everytime you request the Lines property. It is not stored; it's generated on-the-fly.
As a side note (not that it will help you here) but one can resize an array using the Array.Resize static method.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you!
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hello,
Which is the best source code wizard ?
Which is the easiest to understand source code wizard ?
Thanks
|
|
|
|
|
What are you asking for ? The wizards are all good at creating shells for different types of program. Each wizard is the best for the task it was written for.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi!
When calling a namespace like using MyNameSpace.Members, lets say there is 50 classes in this namespace, are all 50 called? Wouldn't this cause a performance dip? I know in Java you can specify which classes you want to include.
How does one say, do I include the namespace, reference it or what?
Regards,
ma se
|
|
|
|
|
The classes are not called at all, they are simply included in the namespace lookup done by the compiler.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ma se wrote: lets say there is 50 classes in this namespace, are all 50 called? Wouldn't this cause a performance dip? I know in Java you can specify which classes you want to include.
It might cause a slight dip in the compiler as it resolves the classes to the correct assembly, but it wouldn't affect the runtime.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi!
Is there a written rule as to when constructors with parameters are to be used? I usually do it like this?
MyClass objMyClass = new MyClass();<br />
objMyClass.Name = "MyName";<br />
objMyClass.Age = 26;
The following could also be used:
MyClass objMyClass = new MyClass("MyName", 26);
The reason why I asked because I once had a class that required about 30 values, and passing it in the constructor looked messy.
Regards,
ma se
|
|
|
|
|
If the value is required (so the object makes no sense without it) it should be in the constructor.
Besides this, use whatever makes the code most intuitive.
|
|
|
|
|
Generally, the object should be fully functional once it's created. For practical reasons you might have to make exceptions from the rule, though.
If possible you should still try to verify that the required values are set before they are used.
---
b { font-weight: normal; }
|
|
|
|
|
again am asking if any one could help i have a problem in begining the code of Ezstego algorithm for steganography detectiong of color palette images.how could i extract the hidden message if the message bits are hidden in the LSB of every color byte of the cover image? using c# language
|
|
|
|
|
You only posted your first question 15 hours ago! Give people a chance to respond. Also, consider that it is possible that people here don't know the answer to your question.
Have you used an internet search engine to try and find an answer?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi!
How do I "disable" a theme for a specific page? I have set my theme in the web config page, but there is one page that I want to use a different stylesheet.
Regards,
ma se
|
|
|
|
|
Hi,
Can i know how to pass the address of the variable in c#?
Following is the code in c which has to be converted into c#..
public int Largest(int *ptr,int Icount)
{
int largest =0;
largest = *(ptr+0);
for(int i=0; i < Icount; i++)
{
if( *(ptr+i) >= largest)
{
largest = *(ptr + i);
}
}
return largest;
}
plz let me know how to sent the reference and increament the pointer.
|
|
|
|
|
you can use ref key word in c# to send the reference of variable
public int Largest(ref int ptr,int Icount)
{
int largest =0;
largest = (ptr+0);
for(int i=0; i < Icount; i++)
{
if( (ptr+i) >= largest)
{
largest = (ptr + i);
}
}
return largest;
}
rahul
-- modified at 5:08 Monday 15th May, 2006
|
|
|
|
|
Thanks Rahul...
But i'm getting error "Identifier Expected" so any idea....
|
|
|
|
|
sorry i forgot to add int after ref key word add it and try
rahul
|
|
|
|
|
From within a property grid, I want to use the a CollectionEditor that is able to display a selection dialog once the "Add" button is clicked. That is, I want the user to choose collection items from a defined list and add them to the collection in CollectionEditor.
For example, in VS 2005 property grid of a windows form, if you want to add an image to a System.Windows.Forms.ImageList, the appropiate property grid displays an image chooser dialog once "add" is clicked. I want to implement something similar to this feature. Any ideas or hints? thanks.
|
|
|
|
|
I'v wrote an application to stream real-time video b/w two pcs (using RTP), when finished I noticed the poor performance and delay between them.
I wonder where can I get a real-time C# encoder/decoder to encode the video before sending it to other side?
لا إله إلا الله
|
|
|
|
|
Hello,
I'm looking for a solution to print documents to tiff in my application, just like the Microsoft Office Document Image Writer. I think the solution uses MODI, but there is very little info about it.
Code examples and other info are very appreciated...
Thanks,
Fedor Brouwer
|
|
|
|
|
|
Hi
Im a beginner, and need some help with my calculator. I have a textbox and it has buttons to calculate Addition, Subtraction, Multiplication, Division, and then also a Exponent button which takes the two values put in the textbox and makes the first value the Base and the 2nd the exponent.
Now must I create a Delegate? and call it eg. MathOp. and then have a seperate event for each buttonClick?
Plz Help
Thanks
|
|
|
|
|
I'd personally just do it in the button click handlers.
|
|
|
|
|
guys, i have a problem with sorting of a file line by line due to unknown character (box [] chracter - similar to this but no space between the lines)encountered. It is included on the given data from the past years.
During sorting line by line, the compiler encounters the box/unknown character, so the compiler will break the statement/line and will result for the new statemen/line. the problem here is that instead of one line, it produces another line to be sorted for the whole file and for that my system can not be accurate anymore.
example i have a file to be sort:
//To be sort:
hello world!
Love programming!
have fun-[]--and enjoy! //[]-illustrates the unknown chracter but no spaces bet. the lines
//after sorting the data will be arranged like this:
--and enjoy! //it will be broke into two lines
have fun-
hello world!
Love programming!
Help me guys.. Dont know what to do...
regards,
JayR
|
|
|
|