15,918,516 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by dahund (Top 5 by date)
dahund
20-Oct-11 17:07pm
View
perfect :-) i think this will work!!! but i would have to clean dictionary from time to time, since garbage collection could have removed some of the objects making my reference invalid!!! But again thank you, have been looking for something like this in a long time.
dahund
20-Oct-11 7:59am
View
No iam trying to create and object for each user that uses the system, and I need to separate these objects from one of the other so I don't have to recreate them all the time (When the object is created it pulls in allot of data from an SQL database, which takes some time) this time.
My idea was that I could use a specific field name for identification of an object, thereby checking if an object with a specific field name exists!!
Maybe there is another way?? naming the object, maybe but dont now how.
dahund
20-Oct-11 7:45am
View
sry, one last question, when working with this object reference. how do i use referenc (key.somemethod()) instead of obj.somemethod ?
dahund
20-Oct-11 7:41am
View
Looks like this is what i need, hopefully you can answer some questions, or correct me I am wrong.
As I understand this, each time I create and object I assign a key(string) which is stored in the Dictionary(cache) next time I want to create a object i first check if the key(string) exists in Dictionary if not I create, else I do something different ( working with object); is this correct ?
and one last thing; Does this check if object runtime reference exists??:
if(!cache.TryGetValue(key, out r)) cache[key] = r = new FileReader(key);
Thx so very much :-)
dahund
20-Oct-11 7:28am
View
SRY did not see the little comment text.