Click here to Skip to main content
15,907,328 members
Home / Discussions / C#
   

C#

 
Questionpicboxes Pin
Ferdiinand4-Oct-18 10:31
Ferdiinand4-Oct-18 10:31 
AnswerRe: picboxes Pin
Mycroft Holmes4-Oct-18 12:52
professionalMycroft Holmes4-Oct-18 12:52 
GeneralRe: picboxes Pin
Ferdiinand4-Oct-18 13:11
Ferdiinand4-Oct-18 13:11 
AnswerRe: picboxes Pin
BillWoodruff14-Oct-18 15:16
professionalBillWoodruff14-Oct-18 15:16 
QuestionConversion from C to C#, Need C# Method Signature Pin
akvbsoft4-Oct-18 8:54
akvbsoft4-Oct-18 8:54 
AnswerRe: Conversion from C to C#, Need C# Method Signature Pin
Luc Pattyn4-Oct-18 16:23
sitebuilderLuc Pattyn4-Oct-18 16:23 
Rant[REPOST] Conversion from C to C#, Need C# Method Signature Pin
Richard Deeming5-Oct-18 1:45
mveRichard Deeming5-Oct-18 1:45 
QuestionHow to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 2:59
kumarkoppireddy4-Oct-18 2:59 
AnswerRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
OriginalGriff4-Oct-18 3:14
mveOriginalGriff4-Oct-18 3:14 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 3:50
kumarkoppireddy4-Oct-18 3:50 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
OriginalGriff4-Oct-18 3:54
mveOriginalGriff4-Oct-18 3:54 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 4:13
kumarkoppireddy4-Oct-18 4:13 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 4:27
mveDave Kreskowiak4-Oct-18 4:27 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 4:54
kumarkoppireddy4-Oct-18 4:54 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 5:04
mveDave Kreskowiak4-Oct-18 5:04 
AnswerRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Gerry Schmitz4-Oct-18 5:10
mveGerry Schmitz4-Oct-18 5:10 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 5:52
kumarkoppireddy4-Oct-18 5:52 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 6:22
mveDave Kreskowiak4-Oct-18 6:22 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 6:25
kumarkoppireddy4-Oct-18 6:25 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 6:46
mveDave Kreskowiak4-Oct-18 6:46 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
OriginalGriff4-Oct-18 6:32
mveOriginalGriff4-Oct-18 6:32 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Mycroft Holmes4-Oct-18 12:48
professionalMycroft Holmes4-Oct-18 12:48 
Questiondisplay value of a key in dictionary to text box and edit value and save out to file Pin
elfenliedtopfan53-Oct-18 14:02
elfenliedtopfan53-Oct-18 14:02 
hello Code project i have created dictionary with key value pairs form a text file and i want to display the value of a key to a textbox

and edit the value in the textbox and on a button click save to the file this is the code i have so far just not sure how to add to textbox and save it out.

C#
public class BO3_weapon_editor
{
    public static string outvalue { get; set; }

    public void processfile(string file)
    {
        Dictionary<string, string> dic = new Dictionary<string, string>();
         string data;
        {
                using (StreamReader reader = new StreamReader(file))
                {
                    string line;
                    while ((line = reader.ReadToEnd()) != null)
                    {
                    var patt = @"(?m)\s*""(.+?)""\s+""(.*?)""\s*";
                    foreach (Match m in Regex.Matches(line, patt))
                {
                     var k = m.Groups[1].Value;
                     var v = m.Groups[2].Value;
                     if (false == dic.ContainsKey(k)) dic[k] = v; else dic[k] += "," + v;
        }

                     outvalue = dic["adsUpAnim"];
                        }
                    }
                }



        }
    }


any help would be much appricated.
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
Maciej Los3-Oct-18 20:28
mveMaciej Los3-Oct-18 20:28 
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
OriginalGriff3-Oct-18 20:35
mveOriginalGriff3-Oct-18 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.