CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Deranged

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    1,314

    Re: Saving srting problem

    Are you forgetting to set value X when they click the button? Something like:



    private void button1_Click(object sender, EventArgs e)
    {
    Int32.TryParse(txtBox.Text, out X);...
  2. Replies
    3
    Views
    1,289

    Re: File reading hlep

    I just wrote up something real quick in Notepad++ that you can do that I would recommend.



    foreach (string s in fileNames)
    {
    using (Streamreader sr = new Streamreader(s))
    {
    int...
  3. Replies
    3
    Views
    1,476

    Re: first program in c#

    So what I am seeing here is that whichever radio button is check the textBox1 will display the strings you have defined. You should be seeing that text. Now, I do not see anything about a checkbox...
  4. Re: My simple program closes automatically (New C# user)

    Curious...
    Line 21 did you mean to put:


    int d = a * b * c;


    That's not causing your problem but just would make sense for what you put in Console.WriteLine
    I'd also change line 26 to...
  5. Re: Retrieve all records when SelectCommand.Parameters[].Value is null

    You can pass the parameter to a stored procedure and check in there if it is null or 0 then do the Select all, and use a reader to get the results?
  6. Replies
    11
    Views
    7,678

    Re: Reading properties file

    Absolutely! If you need any more help feel free to ask.
  7. Replies
    11
    Views
    7,678

    Re: Reading properties file

    I was only using \n for console testing, doesn't really matter. I would personally use Environment.Newline for cross platform.

    I was renewing the list because I didn't want to read all the...
  8. Replies
    11
    Views
    7,678

    Re: Reading properties file

    Ok so I wrote this up extremely fast, but this is an idea of how I would read the file. If I had your source or knew exactly how you specify the property or what you want to do with it I'd be able to...
  9. Replies
    11
    Views
    7,678

    Re: Reading properties file

    I'm just going to install VS2010 lol... give me an hour or so I'll reply back with something you can work with.
  10. Replies
    11
    Views
    7,678

    Re: Reading properties file

    Oh yea, duh, forgot there is a ")" at the end lol
    In that case, couple ways to deal with this.



    //for the properties value
    int num = 0;

    fileDataArray[fDAIndex].Substring(num =...
  11. Replies
    11
    Views
    7,678

    Re: Reading properties file

    I personally do not like ReadAllLines as it can get very memory intensive but if the files are small I guess it doesn't really matter.

    To fix your substring issue you can use:



    while...
  12. Replies
    11
    Views
    7,678

    Re: Reading properties file

    That's a really odd property file. Have you written anything yet?
  13. Thread: CSV Parser

    by Deranged
    Replies
    10
    Views
    1,334

    Re: CSV Parser

    But either way, it can be a pain, lol
  14. Thread: CSV Parser

    by Deranged
    Replies
    10
    Views
    1,334

    Re: CSV Parser

    Well there are many ways to reduce those combinations.

    1. We don't really know what kind of data he is working with. If he had dates in one of the columns, for example, column 4, you can regex...
  15. Thread: CSV Parser

    by Deranged
    Replies
    10
    Views
    1,334

    Re: CSV Parser

    I am really curious about this question, which I am having a hard time understanding. Are you saying you have 6 columns, and one column could be something like:

    "Value1,...
  16. Replies
    3
    Views
    3,901

    Re: If richtextbox is empty to display a msgbox

    I use this for a textbox, pretty sure it's close to the same as a rich text box.



    if (String.IsNullOrEmpty(textbox.Text))
    MessageBox.Show("No text detected, please enter...
  17. Thread: Game problem

    by Deranged
    Replies
    7
    Views
    1,310

    Re: Game problem

    Good point, so just keep Random alive and pass it to the method? or add sleep time?
  18. Replies
    2
    Views
    5,837

    Re: XML Comment Error.

    Here is something I threw together real quick:



    Sub Main()

    Dim file As String = "D:\file.xml"
    Dim line As String
    Dim lines As New List(Of String)
    Using...
  19. Replies
    11
    Views
    26,876

    Re: Counting words in each sentence using C#

    I work with hundreds if not a thousand insurance companies, they fail, hardcore. I have see hundreds of delimited files, all kinds are different in some way. Ugh, but you're right, tab delimited is...
  20. Thread: Game problem

    by Deranged
    Replies
    7
    Views
    1,310

    Re: Game problem

    Anyways, I went through it real quick, it definitely needs more optimizing, I would think about that before you get too far or it will get confusing. I combined the choice classes, I didn't see a...
  21. Thread: Game problem

    by Deranged
    Replies
    7
    Views
    1,310

    Re: Game problem

    Where is MainGame()?

    Is hero.M*****ic
    supposed to be: hero.Magic?
  22. Replies
    1
    Views
    977

    Re: Efficient way to do validation

    I do very similar stuff at work all day. I actually have a dll that has an entire flat file validation. The dll calls for a custom XML made for individual files I insert into a database. In my XML it...
  23. Replies
    11
    Views
    26,876

    Re: Counting words in each sentence using C#

    I find it too inconsistent, or rather too generic. I parse files all day and if the file has a lot of mistakes, your going to grab those mistakes with the .Split

    For example if you had a CSV file...
  24. Replies
    11
    Views
    26,876

    Re: Counting words in each sentence using C#

    Here is my method of doing it, console application so that you can enter whatever sentence you want. (I do not like String.Split)

    That was a fun movie. I want to watch it again. We should...
  25. Replies
    24
    Views
    2,905

    Re: [2010?] Excel split/corrections

    Well I know I completely messed it up so I didn't post it. I honestly cant figure out what to do at this point even with suggestions. I just need to probably drop this and learn a bit more to be...
Results 1 to 25 of 36
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured