|
I have used sockets but can i pass objects also, like hashtable?
|
|
|
|
|
Are they both exes? Sounds like a standard n-tier app otherwise.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yes. A is having capability of accessing huge data so that whenever I used to debug B there will be no need to load that much of data every time. So i just want to load data in App A, and further accessed by B.
|
|
|
|
|
In which case then probably sockets would be a good choice, but I would look at the overall architecture as it sounds like application A is really a data server. Potential for web service perhaps?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hmm. Sounds like a job for WCF (Windows Communication Foundation). This opens up many different types of bindings for you.
|
|
|
|
|
class Program
{
static void Main(string[] args)
{
Dictionary<book,object> entries = new Dictionary<book, object="">();
entries[new Book("C# Cookbook", 234)] = null;
entries[new Book("ADO.NET Cookbook", 277)] = null;
entries[new Book(".NET Framework", 455)] =null;
entries[new Book("Windows Forms", 873)] = null;
getproperties(entries,"books");
}
private static Dictionary < Book,object > getproperties(Dictionary< Book,object> entries,string myString)
{
//Return new dicitonary of type Dictionary < Book,object> which has myString in as value and entries as book
}
}
class Book
{
private string m_Title;
public string Title
{
get { return m_Title; }
set { m_Title = value; }
}
private int m_Pages;
public int Pages
{
get { return m_Pages; }
set { m_Pages = value; }
}
public Book(string title, int pages)
{
m_Title = title;
m_Pages = pages;
}
public string Display()
{
return String.Format("{0} ({1} pages)", m_Title, m_Pages);
}
}
|
|
|
|
|
So, Queer-Boy, er, Justin Timberlake, what's your specific problem you have had in implementing this yourself?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I am unable to modify the value of dicitonry iterating all the keys using foreach loop
|
|
|
|
|
Right, you're not allowed to modify a collection while you're using foreach , but you could try a regular for loop.
I didn't think there was anything you could do worse than sing, but you have exceeded my expectations.
|
|
|
|
|
I wanted to this .............. i got it this moring
private static Dictionary<book,object> getproperties(Dictionary<book,object> entries,string anyString)
{
Dictionary<book, object=""> mydict = new Dictionary<book, object="">();
/// Dictionary<book, object=""> d = new Dictionary<book, object="">();
foreach (Book mybook in entries.Keys)
{
mydict[mybook] = anyString;
}
return mydict;
}
|
|
|
|
|
And what is the error your getting when you try to do that?
It looks like your trying to copy the entries from one dictionary to another? If so, you should probably be using the Add() method instead of trying to do this through the indexer.
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]
|
|
|
|
|
i want to see a whole xml file in the richtext box. how can i see it or access it?
|
|
|
|
|
Use XmlDocument to load it - and then bind the text to the textbox.
|
|
|
|
|
plzzzzzz explain through code , i dint get you
thanks
|
|
|
|
|
|
Google "reading text file in C#", this is basic IO. It's a text file, look at the StreamReader , (or even the XmlTextReader if you really need it, though it doesn't sound like you do).
|
|
|
|
|
how do i create a line graph using c#, values will be in sql table???
|
|
|
|
|
Use a graph control. Read the point values out of the database and bind them to the graph.
|
|
|
|
|
how can i programatically search node in the treeview? and if i am accessing xml file in treeview, then how can i search the node in xml file too?
|
|
|
|
|
its urgent plz help meeeeeeeee
|
|
|
|
|
samidhas wrote: its urgent plz help meeeeeeeee
Tut tut. It's always urgent. Saying this is just plain rude and inconsiderate. Why do you think your requirements are any more urgent than all of the other posters?
This is a volunteer only forum, so you have to be patient and wait for the relevant volunteers to get round to answering your questions. Pestering people and posting crap like this makes it less likely that you will get help. We get very annoyed at people with attitudes like this.
|
|
|
|
|
Create a method that recursively searches through the ChildNodes in your treeview. To do this, pass the top most node in and then do a foreach on the ChildNodes, and if you haven't met your criteria recursively call the same method passing in the ChildNode that you are iterating over.
|
|
|
|
|
I have a control which is inherited from ListView . When user presses F2 key, I am invoking a delegate whose target is in other class. I need to pass an object as parameter to this delegate call. I want to know which one is the best method to do this.
1 - Pass as a ref parameter
2 - Pass as normal parameter.
OnF2KeyPressed(ref MyCustomObject) or OnF2KeyPressed(MyCustomObject) ? Which one do you suggest ? Why ?
|
|
|
|
|
Think about it... Why would you want to give another class a reference to your instance of your object, especially when this class is only coupled through a delegate?
It depends on what you plan on having this other class do though. If it needs to act on information in the object, a reference isn't needed. If it needs to make changes to the object a reference would be needed in this scenario, but if that's the case this is probably not the safest design to solve your problem.
If this is a test/homework question, think about the difference between passing by reference and by value and when each is appropriate.
|
|
|
|
|
In VC#, can we apply transformation (rotation) to DrawReversibleFrame?
I want to drag the rectangle (tracker) which is at, for example, 25 degrees (rotation).
If we use DrawRectangle while dragging it will leave traces...
Any solution?
|
|
|
|