|
Ooops!
True, Only have .Net 1.1 so I couldn't test it, but same with ArrayList and Hashtable!
Thanks, for pointing it out!
All the best,
Martin
|
|
|
|
|
Hi Joz,
The GC runs when it needs to run, i.e. when your process needs free memory
(because you are creating a new object, typically with the "new" keyword)
and the OS does not give it more memory, so it has to go and look if anything
it holds can be thrown out. The execution of the GC is not periodic, and
is not invoked by closing a scope (as in returning from a method).
A SortedList is not threated any different by the GC than any other object.
A SortedList item will be garbage collectable as soon as no references to it
exist any longer.
An item in a SortedList will be garbage collectables as soon as the reference
to it inside the SortedList becomes the last reference AND the
SortedList becomes collectable.
"garbage collectable" means the next time GC runs it will be able to collect
the object (i.e. actually collecting it, or putting it on the finalizing list,
which is handled by a separate GC thread).
SortedList does not implement IDisposable, the code snippet using (... SortedList)
will not compile, because SortedList does not implement IDisposable.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Is there any free open source viewers for .Net that supports SVG.
I tried with Adobe SVG viewer 3.03 ,but can't figure out any way to add it in the toolbox.
|
|
|
|
|
SVG needs to be installed on the client. Then you can generate SVG using any classes you like. The Adobe viewer is the file that your user needs to install, it doesn't get added to the toolbox.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian ,thanks for your reply,It's Ok for a web application.But how could I display an SVG graph in a windows application.
I think I have to check out the older versions of adobe viewer for any activex controls.
-- modified at 5:08 Tuesday 28th August, 2007
|
|
|
|
|
|
Thanks vasudevan,this sounds cool. I will check it out, though I got solution in another way.
|
|
|
|
|
I went back to svg viewer 3.0 and there we have an activex control.
|
|
|
|
|
im looking for a custom textbox that when you enter some text it will automatically create space to the next entry.
ex: when entering the text "CODE PROJECT" in the textbox
it will automatically becomes "C O D E P R O J E C T" while typing
or
a textbox that can make an entry on an individual box.
|C|O|D|E| |P|R|O|J|E|C|T|
TheCardinal
|
|
|
|
|
Did you try the MaskedTextBox?
Life is not short... the problem is only how you organize yourself
|
|
|
|
|
Internal-Access is limited to the current assembly.
Internal Protected-Access is limited to the current assembly or types derived from the containing class.
after then i implemented it , for that i created window application project and a class library project.
in class library project namespace i did the following code
namespace ClassLibrary1
{
public class Class1
{
protected int aniket = 10;
protected internal int tushar = 20;
internal int pavan = 30;
}
}
and in the window application project , after adding the reference of class library project , in the class file , i did the following code.
namespace validation1
{
class Class2: Class1
{
void method()
{
//variable aniket and tushar are accessible in thederived class due to reason that they are protected inernal and protected respectively.
//while the member named pawan is not assessible, because it's datatype is intenal.
Is this all the difference between internal and internal protected.
I mean , i wanted to ask that the findings i did for these two access modifiers are correct , or there is somethig else , that is needed to be understood the difference between them.
}
}
}
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
You got something wrong.
Public = Accessible from everywhere
Protected = Accessible from class or derived classes.
Private = Accessible only from the same class (if you don't specify anything, by default it will be Private)
internal = Access is only for the same assembly.
internal means that if I\anyone-else download your class library file (dll) and try to use it, I won't be able to use the stuff that signed with "internal".
So what that you basically did was playing with the "Private" modifier.
Hope you get what I wrote (I can be not-understandable in the morning).
NaNg.
|
|
|
|
|
code is right or wrong?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
No, the definitions of internal and internal protected are wrong.
As I explained.
In the code you can totally erase the "internal", because you're only playing with private\public modifiers.
|
|
|
|
|
AS I SAID. the internal part could be erased from here.
What you did here is EQUAL to this:
protected int tusher = 20;
int pavan = 30;
which is also equal to this (by default):
protected int tusher = 20;
private int pavan = 30;
The internal thing only works OUTSIDE of the assembly, not the class, but the ASSEMBLY - means the WHOLE project, not a file or a namespace or a class, but THE WHOLE PROJECT.
|
|
|
|
|
Sonia Gupta wrote: Is this all the difference between internal and internal protected.
Yes.
Protected - visible to all subclasses
Internal - visible everywhere within the assembly
Protected internal - visible to all subclasses *and* everywhere within the assembly.
Cheers,
Vıkram.
Be yourself, no matter what they say.
- Sting, Englishman in New York.
|
|
|
|
|
|
can two asp.dotnet applications can be hosted in the same host or not
please respond to me
thank u
|
|
|
|
|
Very much right. What is the specific problem that you are encountering?
|
|
|
|
|
i have two applications
when i publish both of the applications
i will be getting
two different set of publish folders
with bin folders(example)
in webspace how do i paste two bin folders
if i create a sub folders it was not wroking becase it requires to .config files
thanks
|
|
|
|
|
i want to know
when we use sqlserver as backend....
while using reporting
i heard people use msoffice
why is it?
|
|
|
|
|
Perhaps ...
1) Seamless Integration
2) User Friendliness
3) Good Reach
4) Vendor Reputation
5) Ease of Maintenance
6) Future Proof Applications
7) Quick Development Time
|
|
|
|
|
Hello...
I want to Input Date in the format dd-mm-yyy (i.e. 27-08-2007)... in Console Program....
Help..... me.....
|
|
|
|
|
I won't help you unless you use ISO 8601 format -- YYYY-MM-DD
|
|
|
|
|
mm = minutes
MM = months
so that format you want is dd-MM-yyyy
|
|
|
|