It seems you need to have unique key in Dictionary also, Dictionary<string,> keyValue = new Dictionary<string,>(); keyValue.Add("1","\"Background\""); keyValue.Add("2", "\"AlignerFail\""); keyValue.Add("3", "\"LZHL\""); keyValue.Add("3", "\"Align\""); Unhandled Exception as already a key present. I need collection which should not contain uniqueness of key. It should accept if keys are duplicate. Can any way we can surpass the key field uniqueness in Hashtable/Dictionary collection?? Thanks, Ashish
Ash20
Posts
-
In Key-Value Pairs , keys need not be unique , which Collection to use? -
SplitStringTokenized the string with delimiter as space ' '. There will be couple of API which does this. String.Split Method Thanks, Ashish
-
In Key-Value Pairs , keys need not be unique , which Collection to use?Hi Allen, Thanks for your response .I am not looking for GUID . The Key-value pair will be For Eg , Lookup 49 0 "Unclassified" 1 "Background" 2 "Desktop" 1 "LZHL" In which Key can be duplicate. I need DataStructure/Collection which can increase dynamically and can hold this values. Thanks, Ashish
-
In Key-Value Pairs , keys need not be unique , which Collection to use?Hi, I want to store Key-Value pairs in some data structure. In this "Keys" need not be unique , so HashTable cannot be used. The size of the collection should dynamically increased. I am not able to locate any data structure suitable to my requirement in C#. Please let me know if you have anything your side. Thanks, Ashish
-
XML Parser ?I need to parse the above XML file and store in Data structure. Struct BookMarkInfo { double x,y,z; String bkMrkName; }StBk[10]; StBk[0].bkMarkName = res; StBk[0].X=1.02; StBk[0].Y=6.58; StBk[0].Z=3.26; StBk[1].bkMarkName = sirt; How can I store it? Thanks Ash
-
Redirection of output from Console window in MFCHi All, I have developed MFC Application with command line arguments. In Batch file I am writing , FastCopy.exe Source_path Dest_path >C:\log.txt The redirection of output from console window to C drive is not working . Copying is successfully done. Case 1) As this is MFC Application , I have use following to parse command line arguments. CString sCmdLine= AfxGetApp()->m_lpCmdLine; Case 2) In case of Windows Console Application , i have handle the command line in Main function using argc and argc. The redirection of output is working fine in this case also the copy. I am using "CreateProcess(0, ptr, 0, 0, FALSE, 0, 0, 0, &si, &pi)" in both case where ptr is pointer to string "C:\Robocopy.exe \\Folder1 \\Folder2" The redirection is problem in case of MFC application. Can anybody please let me know where I am going wrong. If there anyother solution let me know Thanks in Advance Ashish.
-
Embedding Copy Exe in Application Exe?I have developed a Tool . This tool basically check for latest release in the source location and automatically starts copying the release folder to destination. For copying i have used Robocopy software. I have written the code in Win32 console application C++. The problem is the robocopy software should be present in C drive ie (it is hard-coded in code). How can i attach Robocopy exe to main appliation Exe , such that whenever you invoke the application exe , it will search whether robocopy exe is present at that place , if not it will copy the robocopy exe which is embedded in the Application exe to required location. Is it possible? Do i need to convert from Win32 console application to MFC application? Thanks, Ashish
-
Study materials for C++/MFCmention your ID , i'll send some of the MFC book i have. Ashish
-
Base class pointer to Derived Class object??Thanks Koos, I got wht i ws searching for..
-
Base class pointer to Derived Class object??what is advantage of "Base class pointer to Derived Class object" ? class Base { public: Base(){ cout<<"Constructor: Base"<fun1(); I guess it is having same behaviour. Please let me know wht is advantage of using base class pointer to derived class object? Thanks\ Ash.
-
Base class pointer to derived class object???what is advantage of "Base class pointer to Derived Class object" ? class Base { public: Base(){ cout<<"Constructor: Base"<fun1(); I guess it is having same behaviour. Please let me know wht is advantage of using base class pointer to derived class object? Thanks\ Ash.
-
Difference between .idl and .h file?Hey , Can you please explain the diffrence between .idl and .h file? Also How to create a new .idl file in VC6? Thanks, Ash.