|
Eew, you do know we are already at .NET 3.0 and 3.5 is comming in a few months.
Oh well you should so something like:
StringBuilder sb = new StringBuilder();
using (StreamReader re = File.OpenText("abc.txt"))
{
string input = null;
while ((input = re.ReadLine()) != null)
{
sb.AppendLine(input);
}
}
string result = sb.ToString();
Oh StreamReader has a ReadToEnd() which does what I did here :P
string result = null;
using (StreamReader re = File.OpenText("abc.txt"))
{
result = re.ReadToEnd();
}
|
|
|
|
|
Thanks a lot!!!!!
hiiiiii
|
|
|
|
|
hkchauhan wrote: But the formatting of page is breaking.
hwat do you mean ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi,
is there any way to disable show pop-up window in top left corner on form when <f10> key pressed?
Thanks, Jure
|
|
|
|
|
Ops!
I mean when key F10 pressed.
|
|
|
|
|
|
When I press F10 and then up or down arrow key there appear a box with options Restore, Move, Size, Minimize, Maximize and Close. I think that comes from system, because many windows has similar box (like properties on desktop).
|
|
|
|
|
I think it's the system menu.
|
|
|
|
|
Problem solved, thanks to Hans Passant.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.F10) return true;
return base.ProcessCmdKey(ref msg, keyData);
}
|
|
|
|
|
Is it possible to integrate a function over a parametre for example: integral[a,b](f(x))*dx;
Thanks.
|
|
|
|
|
Hello,
Maybe you find some help in this articles![^]
All the best,
noch einen schönen Tag,
Martin
|
|
|
|
|
my requirement is that when I click on a cell of a datagridview the cell number with respect to the row number and column number should be stored in a label control separated by commas or in a combobox collection items. Somebody please help me how to acheive this.
|
|
|
|
|
Hi! Here's the problem:
I have an exe (no source code) wish for it to run only when it finds a valid license on the pc. Therefore I wish to modify it somehow (wrap,modify, etc) so that it will check for certain criterii such as hardware id before launching itself.
What I've found out so far:
I know I can create another exe that embeds the exe using Visual Studio. However, running the exe from memory only applies to .Net exe. I wish to cover non .Net too. And I know that running non .Net exe from memory is very hard.
Question:
How do i do this? Is there a way to modify the exe so that I can insert checking codes before the exe launches normally?
Thanks!
"Long is the way, and hard, that out of hell leads up to light."
|
|
|
|
|
I need to use the FormPrinting, the example that I have use the HorizontalAlignment, but in my particular case I need that the Alignment is VERTICAL. I tried to fix it, clearing the code of lines where appear this type of Alignment, but I can not see results. Thanks for the help!
|
|
|
|
|
hi
i have created controls in asp.net form
now i want use them in a for loop how do i do it..
which is created statically
example
there are three linkbutton1,linkbutton2,linkbutton3
now i want to refer three of them in a for loop
for(//some condition)
{
linkbutton+i.text=":Hi how r u";
}
threee linkbuttons text should become the same statement which is give above
how can i do it
bye bye
|
|
|
|
|
try this:
for(//some condition)
{
linkbuttons lnkBTN = (linkbuttons)this.findcontrol("linkbutton"+i.ToString());
lnkBTN.Text = "anything";
}
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
|
i am getting an exception saying object reference is not found i created an object for that linkbutton using new keyword
|
|
|
|
|
Hello,
I prevere the 'as' operator for casting, as it will never throw an exception!
linkbutton actbutton = controlfound as linkbutton;
if(actbutton!=null)
{
actbutton.SpecialProperty = "wrtferc";
}
If you only whant to access a member of control and just whant to know if it's typof, there would be no need for the casting.
if(controlfound is linkbutton)
{
controlfound.Text = "hnvkjhfdjkv";
}
All the best,
Martin
|
|
|
|
|
doing this all the linkbuttons will get the same text right
i want to assign different text using arrays...
in each of the linkbutton
|
|
|
|
|
please show the code snipped!
|
|
|
|
|
for (int k = 0; k < outlet_arr.Length; k++)
{
l.Text = "kalyan";
l = (LinkButton)this.FindControl("LinkButton23");
l.Text = outlet_arr[k].ToString();
j++;
}
|
|
|
|
|
kalyan_2416 wrote: this.FindControl("LinkButton23");
what is that control that contains those LinkButtons ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
|
try to put them in a panel and then.....
pnlName.FindControl......
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|