|
|
I am worked previously in c++ and you not to make a template in c #.
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
Generics are the c# equivilant. they're only available in .net2.0 (VS05).
|
|
|
|
|
Is there any way to get the problem filename from this exception without catching it in the original calling function and wrapping it in a custom exception with the filename provided? It's lack seems really odd since System.Xml.Schema.XmlScemaException does provide the filename in the error text.
|
|
|
|
|
can 2 different types of exception be caught by the same block, or do I need to do something like this:
catch (System.Xml.XmlException e)
{
//half dozen lines of code
}
catch (System.Xml.Schema.XmlSchemaException e)
{
//Same code as above
}
|
|
|
|
|
AFAIK, After the first Catch block catches the Exception, it returns focus to Finally ( If Exists ), and then to the next statment.
So, this code will :
catch(System.DivideByZeroException ee)
{
}
catch(System.Exception ee)
{
}
IF a DivideByZeroException occurs, the first catch block will be executed and then returns, otherwise there was any other excpetions it will be cought in the general catch block.
"I am a lair" Is this statement true or false ?
|
|
|
|
|
If you can, refactor those lines of code into a method and call the method.
catch (System.Xml.XmlException xmlException)
{
HandleException(e);
}
catch (System.Xml.Schema.XmlSchemaException xmlSchemaException)
{
HandleException(xmlSchemaException);
}
private void HandleException(Exception e)
{
}
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
How work with "cola" in c#
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
First, open the can. Second, balance it on your monitor. Third, enjoy.
Or... what is cola ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
rjorget wrote: How work with "cola" in c#
What is "cola"?
'A programmer is just a tool which converts caffeine into code'
|
|
|
|
|
|
Hi all!
i must ask a stupid thing..
i need to select the first character of a string in a richTextBox.
I wrote this code:
<br />
richTextBox1.SelectedText = System.Convert.ToString(richTextBox1.Text[0]);<br />
It doesn't work and in addition i think it's an heresy^^
Can you post me an example plz?
Thank You
Enrico
|
|
|
|
|
use richTextBox1.Text.Substring(0, 1) for the first character
|
|
|
|
|
Hi!
I think you need to write something like
richTextBox1.Select(0,1); This will select the first character in richTextBox1 .
What you're doing in your code is to replace the selected text (not the selection!) in your RTB with the first character in the RTB.
If you want to highlight the first character of a given string in your RTB, you'd write something like this:
int idx = richTextBox1.Text.IndexOf(theStringToSearch);
if (idx >= 0)
richTextBox1.Select(idx,1); Regards,
mav
|
|
|
|
|
how can open internet Explorer with www.mywebsite.com
in my Windows Applction
Palestine
|
|
|
|
|
look at the System.Diagnostics.Process IE will open the first command line parameter it recieves.
|
|
|
|
|
this is the code:
<br />
Process.Start("www.website.com");<br />
See you
|
|
|
|
|
Hello,
I am using the help class for my help files, and the folder Help where all my help files are located are in my application folder.
<br />
Help.ShowHelp (this, "Help\\Economic Assessment Solution Help.chm");<br />
However, this statement does not work, the app does not display the help option. But if I provide the full pathname it does. I want to deploy the application on other machine, so the full pathname is not an option. Any ideas on what is the best way to do it?
Thank you
|
|
|
|
|
The current directory changes if you use the Open/Save dialogs, so I'd suggest using the Application.StartupPath[^] property instead.
Help.ShowHelp(Path.Combine(Application.StartupPath, "YourFileName"));
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hi im doing a windows application in VS.net 2005 (C#) almost finished,i have an Edit menu
and i have many controls that are loaded as the user context
changes and any of them may contain editable controls,how do i track the state of
all these controls, update the my edit menus( enabled and disable some menu items)
if you could refer me to Articles or working examples id really appreciate it
thanks
regards paula
|
|
|
|
|
I don't know if this is the best way, but you can try using the Application.Idle[^] event to enable/disable your menu items. That event is fired when there are no more messages to be processed by your application. All you need to do is subscribe to the event and in the event handler, check the state of the various user controls and enable/disable the menu items.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Someboby have the Print Version "Professional C# 2005". send me it to rjorget@yahoo.es
Please
help me.
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
|
is there any way to override it's using the default browser for displaying an html file?
|
|
|
|
|
ArrayList a1 = new ArrayList();<br />
<br />
Cube c = new Cube();<br />
c.Value = 1;<br />
a1.Add(c);<br />
<br />
<br />
ArrayList a2 = (ArrayList)a1.Clone();<br />
<br />
Cube ctemp = (Cube)a2[0];<br />
<br />
ctemp.Value = 20;
If I make the clone of a1, all references will be unchanged. So if I take the cubeobject out of a2 and change its value, the value in a1 is also changed. How can I make a copy of Cube?
|
|
|
|