|
Hi,
The problem is that i'm doing this for a Pocket PC with a memory capacity of 64 MB and the file can be quite large. Reading all of the data into storage can sloq down the processing speed considerably. This is quite a dilemma i'm in . Help me out,Guys.
|
|
|
|
|
<br />
<br />
ArrayList alLines = new ArrayList();<br />
StreamReader sr = new StreamReader( "C:\\myfile.ext" );<br />
<br />
string szLine = sr.ReadLine();<br />
while( szLine != null )<br />
{<br />
alLines.Add( szLine );<br />
szLine = sr.ReadLine();<br />
}<br />
<br />
sr.Close();<br />
<br />
<br />
<br />
alLines[ 4 ] = "BLAH BLAH";<br />
alLines[ 30 ] = "MORE BLAH BLAH";<br />
alLines[ 56 ] = alLines[ 56 ].ToString() + " Appended string";<br />
<br />
<br />
<br />
StreamWriter sw = new StreamWriter( "C:\\myfile.ext" );<br />
for( int iCnt = 0; iCnt < alLines.Count; iCnt++ )<br />
sw.WriteLine( alLines[ iCnt ].ToString() );<br />
sw.Close();
Koushik Biswas
-- modified at 16:33 Thursday 2nd March, 2006
|
|
|
|
|
how can i convert a system.string to system.type
Type ct=null;
ct=(Type)Convert.ChangeType("string",typeof(Type));
why the above lines shows error
please help me
chakkara
|
|
|
|
|
If you want to know the type use GetType
Regards
Hansjörg
|
|
|
|
|
string str = "hello"<br />
Type t = str.GetType();
everything derives from Object, which defines the GetType method. So, this also works
int i = 10<br />
Type t = i.GetType();
|
|
|
|
|
TypeDescriptor.GetConverter()
|
|
|
|
|
I assume that you have a string representing a type (like "System.String") and you want the System.Type corresponding to System.String:
Type ct = Type.GetType("System.String", true); // True throws an exception if the type is not found.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Why the outputs are not the same?
Char[] aChar = new Char[] { 'h', 'e', 'l', 'l', 'o' };
Char[] bChar = new Char[] { 'h', 'e', 'l', 'l', 'o' };
string a = new string(aChar);
string b = new string(bChar);
object c = a;
object d = b;
Console.WriteLine(c == d);
String e = "hello";
String f = "hello";
object g = e;
object h = f;
Console.WriteLine(g == h);
Regards,
Diana.
|
|
|
|
|
because achar and bchar are two character arrays while e and f are two string variables thus they r not equal
reply by
dhamija.manoj@gmail.com
manojdhamija@yahoo.co.in
manoj
|
|
|
|
|
try this one
just change the following lines
string a = aChar.ToString();
string b = bChar.ToString();
now run the program and see the outputs
Regards,
Pramod
|
|
|
|
|
The compiler regognises that the e and f strings are identical, and uses the same value for them. As e and f references the same string, the objects g and h will also reference the same string.
When you compare two object references, they will only be considered equal if they reference the same object.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
You mean all the identical strings will have same reference?
Thanks
|
|
|
|
|
Yes. All string literals that are identical will be reused.
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
I have 2 ComboBoxes on a form which should display the same list of strings.
If I use the same datasource objects ComboBox1 changes with ComboBox2 independend of the DataBinding object
if I make two different datasources I have the problem that only one is updated with the object that they represent...
What is the best way to solve that issue?
Til now I have tested this:
<br />
deviceListBindingSourceCmb1.DataSource = devices;<br />
deviceListBindingSourceCmb2.DataSource =devices;<br />
CurrencyManager mng = (CurrencyManager)this.BindingContext[devices];<br />
mng.List.Add(new DeviceItem("test4"));<br />
In this case the Item is added to devices, but this is not visible in the comboboxes..
Regards
Hansjörg
|
|
|
|
|
anybody know how to code dragdrop in C# asp.net. Any code help or links
|
|
|
|
|
|
Actually i want drag the name of a person from one data grid to another data grid. How is it possible ?
|
|
|
|
|
Hi, I am planing to do a voice chat software with VoIP. Can you guide me to do that?
|
|
|
|
|
Too vague!
Do you plan to create the VoIP system yourself, or get a third party VoIP and you just control the third party component from your software?
What aspects are you stuck on? What exactly do you need help with?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Yes I am planning to create VoIP system myself. Can you help me to start with ?
|
|
|
|
|
Have you designed anything yet? I would guess the critical element is the protocol. Do you have any idea on the communication protocol? Are you using an existing protocol? Are you going to create your own protocol? Do you know anything about audio compression? Do you know anything about interacting with audio hardware?
There are lots more questions that you need to know the answer to to get started with any reasonable expectation for success. If you don't know the answers then you need to find them out. However, the small range of questions I've posed above are high level and way beyond the help you could reasonably expect from a reply in a forum post. My suggestion is that you need to do some research into the topic and then, if you are stuck on the implementation, come back and ask for help in specific areas.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Assumably you are planning to utilize a current VoIP protocol SIP might be a good place to start. There are vendors providing .Net framework API's for the SIP protocol such as www.independentsoft.com. www.voip-info.org is another good source of information.
|
|
|
|
|
hi
my problem is
there is one list box in my program and a dialog.
when i am selecting one class name from the dialog
then all methods inside the class should display in to the
list box.
how can i do this without reflection
nidh
|
|
|
|
|
|
nidheeshkayal wrote: how can i do this without reflection
Why do you want to do it without reflection? (I can't think of any solution that doesn't use reflection - So I would help otherwise)
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|