|
Thanks for your reply. I can do it really with some iteration or recursion easily- when I know that there is no other way.
I am trying to implement AOP like feature without defining a new class. Some classes do use reflection and my AOP proxy is bypassed in that case. If I could inject some IL at the method beginning it'd be nice. I do not have access to the source but can define which dll is going to be used with the application.
I know its nasty. I really prefer to walk with my girlfriend to write code- but still some people does not like my idea of walking. Joking
Thanks.
|
|
|
|
|
Have a search on this site for the LinFu articles by Philip Laureano. They sound like just the ticket for you.
|
|
|
|
|
Hello Everybody
I am developing an application and i want that when user click on copy button the the content of that of that control get copied and when paste to MS word then it comes as it is on the document.
|
|
|
|
|
Hello,
You may use the Clipboard to copy the data/text and then paste it to your destination.
For example the code below will copy the text in the textbox to the clipboard and then you may paste it to your destination:
//Copy
Clipboard.SetText(this.textBox1.Text);
//Paste
this.textBox2.Text = Clipboard.GetText();
Regards,
Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Thanks for solution
Regards
Dikshant
|
|
|
|
|
Please use 'Clipboard', u can use the following relevant functions :-
Clipboard.GetData().
Clipboard.SetDataObject()
etc.
Thanking u.
PalSubrata
|
|
|
|
|
hello everybody
how change axe x in excel graph in c# ?
thanks
jere
|
|
|
|
|
hi,
im doing a project now.In that i used plenty of variables like
datasets,arraylist and other things.It takes lot of memory while using
these objects.eventhough i disposed that objects(using dataset.dispose(),clear(),reset(),similiarly for arraylist and others ) it still not releasing the memory.we tried GC collect also.but unable to solve the
problem
thanx in advance
|
|
|
|
|
karthikeyan1983 wrote: i disposed that objects(using dataset.dispose(),clear(),reset(),similiarly for arraylist and others ) it still not releasing the memory
Are you getting any error ? Make sure all instances which has a Dispose() method is called once you finish using it. Put the class instances which are disposable in a using statement. This ensures the disposal of objects.
|
|
|
|
|
I have disposed memory like this for dataset and arraylist etc.....
but initally it will take 13,000 K amount of memory but after finish the program it is taking 80,000 k amount of memory even if dispose like this......
for dataset......
F_Info_set.Dispose();
T_Info_set.Dispose();
F_Cnt_DB.Dispose();
T_Cnt_DB.Dispose(); T_update_set.Clear();
F_update_set.Clear();
Distinct_date_set.Dispose();
for arraylist.......
Date_List.Clear();
ls_Item.Remove();
Chk_item.Remove();
rec_Item.Remove();
sorted_Mdb.Clear();
temp_Sort.Clear();
D_info.Clear();
Change_date.Clear();
for DBconnection....
db_con.Dispose(); for DBcommand....
db_com.Dispose();
dd_com.Dispose();
F_insert_cmd = null;
T_insert_cmd = null;
del_integ_mdb = null;
for DBadapter.....
db_adap.Dispose();
dd_adap = null;
F_info = null;
drrow = null;
|
|
|
|
|
Hello,
Apart from Disposing, you have to make sure, that there are no references to your objects "alive".
I would recommend the usage of a memory profiler!
All the best,
Martin
|
|
|
|
|
Odds are very high that you're fine. The objects you refer to are not very big, and the task manager is a poor way to work out how much memory your app is using.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
starting from 16000 it reaches nearly 80000k.and never it came back to the normal range
|
|
|
|
|
It sounds like you are using TaskManager to look at your memory usage. You should use PerfMon instead since TaskManager is obly reporting the total amount of memory allocated to the runtime process not how much memory you are actually using.
You shouldn't make direct calls to GC.Collect as that will end up hurting your performance in the long run.
As long as you are properly disposing of your objects (make sure you are using a try..finally block or the using statement) you should be fine. If you really want to see what is going on, you will need to use a memory profiler like the CLR Profiler.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
any body help me to calculate the factorial value of any inputed number.
Note: Be sure bcz no. of code available but all are calculated only <100.
ashutosh kumar jha
|
|
|
|
|
ashutosh kumar jha wrote: Note: Be sure bcz no. of code available but all are calculated only <100.
And what is the factorial of 100? Does the answer give you an idea why code to compute anything higher isn't generally available?
|
|
|
|
|
Do your own homework. And, read the assignment.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do your work, we are not here to do your work.
We can help you to solve your problem if you face any problem or doubts.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
|
Hey Guys
Me and the guys on my DevTeam are busy doing planning for our software (a time and atendance system)
Our aim is to have a Server application (this will contain a calculation routine and a communication routine), and a client application (setting up shifts, employees, etc and give reports)
we are stil in the process of deciding how we will have these programs "talk" to eachother.
something that will influence the final decision greatly is if we can get data from devices on the client machines from our server app. So i need to have access to a remote computers com ports
im sure its not imposible, but have any of you guys atempted something simmilar? can u point in in a direction? or even just give a thuaght on the idea
Thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Will your client application running on client machine? In that case use that client application to hande the com ports and server application to communicate with the client application. If you do not install your client application on client machine (I wonder) then design an application (service type) for the purpose. Are you planning to use a smart card reader or similar thing? Windows has default support through GINA.
|
|
|
|
|
yes the client will be running on a client pc, but not always! some of our clients (actual ppl ) wont use our software with multiple users so they will have the client and server on the same pc and a periphiral device on its com port.
the devices we get data from ranges from fingerprint scanners to palm scanners to proximity scanners (those use a card as "key"). they are all used as an offline system IE when a person puts his finger on the scanner the record of it stays on the scanner until "polled" by our server app, only then all the records are transfered from the scanner to the server which will then write it to a database and let the client applications know there is some new data
now in some cases our clients may have more than one scanner, but only one connected to a pc. so in that case a scanner will be on clientPcOne and another on clientPcTwo. serverPc must be able to get to the data on the scanners from its location using clientPcOne and clientPcTwo as a "gateway" to the scanners if that makes sence
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
I have worked with Mifire and proximity cards. I used a windows service (back then I wrote using c++) to commulicate with the card readers. Then the service would use webservice and send the data to a central server pc. If your situation is not much different you can use this method. But in this case you need a service always running background.
|
|
|
|
|
well the server app will be a service running in the background, or thats the plan atleast
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Sorry, but I do not understand the point of controlling a port from remote location. This means you need a driver that listens to a specific port for remote control commands. What I was sugesting is to control a remote application- not port- and let that application control port. Should not it work for your purpose?
|
|
|
|