|
George_George wrote: is it related to my question?
was it part of my reply to your question?
George_George wrote: .Net does not release resource automatically?
it does, in a lazy way. That is why we have Dispose() and Close() methods, so we can tell it to perform some cleanup sooner hence reducing the load of the app on system resources. When an object no longer needs to be open, you should call Close() if that exists. When an object is no longer needed, you should call Dispose() if that exists, and not touch it any more. That is Kyoto for programmers.
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
modified on Friday, June 10, 2011 12:15 PM
|
|
|
|
|
Thanks Luc!
1.
Why if I do not call close, there will be timeout? I can not think of the relationship between them.
2.
"was it part of my reply to your question?" -- confused. What do you want to express?
regards,
George
|
|
|
|
|
George_George wrote: Why ... there will be timeout?
GetResponse needs some system resources to execute the request, those resources are finite, and since you have chosen not to release them explicitly, it has to wait for them and can not even start executing your command, possibly longer than the allotted time to perform its entire operation.
The way networking has been implemented there is only a limited number of concurrent operations supported; not closing some helps in hitting the ceiling pretty soon.
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
modified on Friday, June 10, 2011 12:16 PM
|
|
|
|
|
Thanks Luc,
"those resources are finite" -- should be open connection handles in my scenario?
My confusion is, what is the limitation number? Any documents mentions the number? I find it is too small, in my testing, less than 10.
regards,
George
|
|
|
|
|
George_George wrote: open connection handles in my scenario?
amongst others. empty buffers in a protocol stack, whatever.
George_George wrote: what is the limitation number?
I don't know, I never had a need to know. I close stuff in time.
George_George wrote: Any documents mentions the number?
I don't know. Your search tools are as good as mine.
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
modified on Friday, June 10, 2011 12:16 PM
|
|
|
|
|
Hello,
I have a project which uses various different assmeblies for each task
for example:
Crop pdf - assembly
Write Word - assembly
Create excel and convert to HTML - assembly
Now there can be n number of assemblies which will be used based on some condition.
I have two questions as below:
What kind of pattern will be best suited for this?
How can I make sure that the code written by each individual for each assembly do not have a common code in place.
Regards,
Pavas
|
|
|
|
|
mpavas wrote: What kind of pattern will be best suited for this?
Create a common interface which all your assemblies has to implement. You can use Factory pattern and return the interface instance. pseudo code follows
Interface ITask{
void DoTask();
}
ITask task = TaskFactory.GetTask(TaskIdentifier)
task.DoTask() TaskFactory.GetTask will check the conditions and load relevant assemblies using reflection and return it's instance.
mpavas wrote: How can I make sure that the code written by each individual for each assembly do not have a common code in place.
This is not clear. Can you explain?
|
|
|
|
|
Thanks,
The last question was:
There are 10 developers writing different assemblies.
Now how can we make sure they do not use duplicate codes.. I guess we need to fist list out all the different methods hence we can re-use them.
Thanks for the suggestion
Regards,
Pavas
|
|
|
|
|
mpavas wrote: Now how can we make sure they do not use duplicate codes
What do you mean by duplicate code? You should conduct meetings with the team members and decide how each one has to code. Peer reviews also will work.
|
|
|
|
|
Yes, Thanks for answering the stupid question. I also thought that after posting the question
Regards,
Pavas
|
|
|
|
|
Dear All,
I have MDI form and i put a panel into my mdi form and the panel dock status is fill.
I want to open other forms as child in this MDI form.
sure i use MdiParent properties of child form to assing parent to current form.
i open the child form, it gets opened, but it does not appear to the front, front of panel.
it means i can't see the child form.
how should i open to see the child form, if i must have panel there.
Thanks,
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Chetor astee Abdul?
Use the BringToFront() property of the child form.
|
|
|
|
|
thx and nice term,
BringToFront() method doesent work,
it does bring the form infront of panel.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Read the design code and make sure you have added the child to the mdi and not into the panel. If you have placed it into the panel and your making the panel invisible, the child form will also be invisible.
|
|
|
|
|
i am doing this.
childF.MdiParent=this;
"this" refers to parent form which is MDI
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Okay that does not help much. Paste some more code and we can help you. How are you calling the child form? How are you showing it? There are many ways this can be done and we have no idea how YOU are doing it.
|
|
|
|
|
Here i have the complete code
[code]
Form1 f=new Form1();
f.MdiParent=this;
f.BringToFront();
f.Show();
[/code]
"this" points to Form which MDI.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi i had a project to create an SMS Gateway. They will add multiple modems after implementation so i want to include load balancing for all those modems. It is fine to use round robin to do the load balancing but how will my program identify if they add one more modem? they will just enter the modem configuration manually into a pre - created text file. So my program should identify if there is a new modem added from the text file and do load balancing accordingly. How can i acheive this??
|
|
|
|
|
hi !!!!!!!!!
i want to know how to write code on system shut down event
Azad Yadav
|
|
|
|
|
Check the documentation for the windows messages WM_QUERYENDSESSION and WM_ENDSESSION .
«_Superman_»
|
|
|
|
|
Handle the FormClosing event. It gives you the close reason.
void YourForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.WindowsShutDown)
{
}
}
|
|
|
|
|
|
typedef vector <addresstoken*> ADDRESS_TOKENS_VECTOR;
AddressToken is a predefined structure
can anyone explain the above code
the quieter u become more u hear
|
|
|
|
|
This is a C++ question, not C#. Anyhow, typedef is used in C and C++ to give a type a new name and is often done for clarity purposes. I think what the code is doing is creating a vector of type addresstoken pointers and its given a succint name as ADDRESS_TOKENS_VECTOR.
|
|
|
|
|
C# doesn't support typedef .
|
|
|
|