|
Thanks Navaneeth for your reply !!
|
|
|
|
|
I want to store two keys and one value associated with those keys in an object and want to send that object to some method.
As hash table can have key value pair,What is the way to do this??
|
|
|
|
|
You can use a <code>Dictionary</code> object with key set as an array. Something like this:
<pre>Dictionary<string[], string> oDictionary = new Dictionary<string[], string>();</pre>
modified on Friday, July 31, 2009 3:01 AM
|
|
|
|
|
A Dictionary of Dictionaries?
Or write a class to contain the two keys.
Lots of ways.
|
|
|
|
|
|
If you want to reuse existing types, you can use a Dictionary<KeyValuePair<K1, K2>, T> , where K1 and K2 are the types of the two keys you want to use and T is the type of the value you want to use.
Hopefully, the introduction of tuples in .NET 4.0 will make all this more easy.
|
|
|
|
|
So, i'm very new to this site and programming in general. So far i've made just a hex/decimal convert. Well, some of you may be familiar with "CoD Tool" that is used to modify xbox 360 games. I want to make a program like this, but I need some stuff answered.
1. I need to know how to search for a specific string in a file (may be hex string"
2. I need to go so many bytes after the found string.
3. I need to insert, delete, and replace what was found with something else (has to be edited with hex)
For those that don't know, i need to put a "." but change the hex to something like "09" or "12"
|
|
|
|
|
craigchrist8239 wrote: 1. I need to know how to search for a specific string in a file (may be hex string"
Using Regular expression. You can find help regarding regular expressions on this[^] site.
craigchrist8239 wrote: 2. I need to go so many bytes after the found string.
Not sure what do you mean by this.
craigchrist8239 wrote: 3. I need to insert, delete, and replace what was found with something else (has to be edited with hex)
File.ReadAllLines and File.WriteAllLines method would do that. AFAIK, you cannot edit a file. You will need to read entire file and then write entire file again.
|
|
|
|
|
Thx for this, i'll look into it, but, what I mean by go so many bytes after a found line is...
What 1 thing you do is search for C1C8F1 in hex, then go E6 bytes past the C1C8F1 and thats what you have to edit. You do that because what you have to edit isn't the same every time.
|
|
|
|
|
In that case, File.ReadAllBytes and File.WriteAllBytes will be good for you. Not sure though.
|
|
|
|
|
I'm writing an application file copy, but do not know how to get the source folder and target folder when copying the explorer (ie: when a user R_Click and select Copy, Past the windows explorer and I want to take the path of this directory)
Thanks !!!
|
|
|
|
|
If you see the "Main" method, it looks like this :
static void Main(string[] args)
You get the directory in "args".
Just use args[0] and args[1]
|
|
|
|
|
Hi,
kindly let me know, How may I change back color in LISTBOX of any particular item or index ?
Thank you
(Riaz)
|
|
|
|
|
You can do that by handling DrawItem event of the ListBox. Make sure you set the DrawMode as OwnerDrawFixed or OwnerDrawVariable as per your needs.
|
|
|
|
|
|
I want to draw a graph similar to microsoft project plan which shows tasks (start & completion date for each task) and dependency like if start of any task is dependent on completion of other tasks.
To start with i need some guidance. I searched in google and i found ZedGraph but it does not solve my requirement. Please help
|
|
|
|
|
If you look at the source code for zedGraph, that may help a lot. Basically you handle a paint event and you write code to draw your graph.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Just like DrawLines can draw hundreds of thousands of lines at once, hell lot better performance than going through loop and drawing each individual line.
I want something similar for ellipse as well..Going through loop is making my app really sluggish..
Pl help
|
|
|
|
|
Unlike Graphics.DrawLines, there is no equivilent DrawEllipses. You have no choice but to loop through each ellipse you want to draw.
|
|
|
|
|
I'm working on windows application.I need to find out the number of bold letters available in the Word document.
I have used name space Microsoft.Office.Interop.Word to read the word document and also tried with some of the properties like Selection,Range to find whether the character is in bold or not but no result.
I have read each character by reading the content of document and checking its format but here while reading the text the character is missing its Format.
I have also tried by converting it into html format and tried by using HTML Element Collection but it is unable to read/recognize the bold tag.
Please give the solution to count the bold letters of word document.
Thanks
|
|
|
|
|
This[^] wasn't good enough?
|
|
|
|
|
My application has a WebBrowser object
Inside a WebBrowser object i navigate to google site and from there a want to type something in the textbox and then press search button
how can i achieve that? can anyone check this code?
WebBrowser_Main.Navigate("http://www.google.com/");
while (WebBrowser_Main.IsBusy == true)
{
Application.DoEvents();
}
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument)WebBrowser_Main.Document;
HTMLInputElement otxtSearchBox = (HTMLInputElement)myDoc.all.item("q", 0);
otxtSearchBox.value = "code project";
HTMLInputElement btnSearch = (HTMLInputElement)myDoc.all.item("btnI", 0);
btnSearch.click();
thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
You're going about it all wrong. If you want to add search capabilities to your own site or app, use the search API Google provides, here[^].
|
|
|
|
|
i understand what you said, but i don´t want to do that
google is a exemple, i what to login to one site using that type of code
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|