|
I just realised you'd asked this twice. I assumed that you knew that you need VS2005 to have generics in C#, but given that you asked the same question again, perhaps you don't ? If you have VS2002 or 2003, there are no generics.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do I add a reference to an assembly that is in the GAC (C:\Windows\Assembly) folder? The problem is that I use a third party dll that is register in GAC but not available elsewhere in my hard drive. So I have to use the copy in the GAC folder.
Any suggestions would be appreciated.
Thanks,
Sandeep.
|
|
|
|
|
If it's registered in the GAC, I believe you have to use that assembly. Trying to use a non-GAC registered copy caused an error.
|
|
|
|
|
Yes but the problem is how to add the reference to that assembly??
|
|
|
|
|
In Visual Studio you mean?
Right click the references folder in the Solution. Click Add Reference... in the .NET* Tab you will find the assembly.
* I think... I don't have visual studio open right now.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Yes, but the assembly is in GAC and I cannot browse to the dlls in GAC folder (C:\windows\assembly). I do not have any copy of the dll in my drive..
Hope you understood my problem.
|
|
|
|
|
[EDIT]
Sorry... My bad.
It seems I am mistaken and this is not the answer to your question.
[/EDIT]
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
-- modified at 17:01 Monday 7th November, 2005
|
|
|
|
|
I have an assembly in the GAC folder which I cannot see in Visual Studio .Net tab for Add Reference.
If you observe, the path of the assemblies in the .Net tab will never be the GAC folder. For system assemblies, it is C:\Windows\Micorsoft.Net\Framework\v1.4.3222\System.dll.
That means there are two copies. One is a copy of the assembly in windows directory which is being referenced and the other is one in the GAC folder. Now I do not have such copy in my drive other than the one in the GAC folder. All i have is the dll in the GAC folder.
Is there an alternative or a procedure that can show all the assemblies in .Net tab from the GAC folder?
I have a third party dll that is installed in GAC and i need it for my application. I do not have access to the dlls directly at all.
|
|
|
|
|
gacutil /l will tell you what is registered in the GAC. You can also reinstall assemblies using this utility.
|
|
|
|
|
|
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.
|
|
|
|