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

Search:

Type: Posts; User: Talikag

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    2
    Views
    527

    Re: Read XML with C#

    Seems like this XML document is not valid...
    Either find out where the dtd file referred in the second row of your XML document is located (appearantly it's not in dev.joomla.org/something), Or...
  2. Replies
    1
    Views
    696

    Re: Read Nested XML

    1. Find the XmlNode corresponding to <page> (i.e., by accessing the first child of the root node)
    2. Print the InnerXml / OuterXml properties of this node:...
  3. Replies
    2
    Views
    497

    Re: string to list c#

    Try replacing:


    var Listtokens = from s in input.Split(' ')
    where s.Length > 3 && !stopWordsList.Contains(s)
    select s.ToList();

    With:
  4. Re: Inconsistent exception behavior in FirstOrDefault() method with lambda expressiio

    In that case, FirstOrDefault should return a value of null, and not exception should be thrown.
    Maybe the NullPointerException occurs after the FirstOrDefault call, when attempting to access some...
  5. Re: Inconsistent exception behavior in FirstOrDefault() method with lambda expressiio

    What do you mean by "zero elements"?
  6. Re: Inconsistent exception behavior in FirstOrDefault() method with lambda expressiio

    This exception is probably thrown because fieldList contains a null element, i.e., one of the elements of fieldList is null. Therefore, when the program runs your lambda expression on this element,...
  7. Replies
    1
    Views
    781

    Re: Find Specific XML Node value

    Yes - using XPATH you can search for specific nodes. I believe something like that would work:


    XmlDocument doc;
    //load your document to doc here...
    XmlNode node =...
  8. Replies
    4
    Views
    1,079

    Re: Bitmap to Jpeg converter

    Well, You could always temporarily save on disk the image in the wanted format, and then read its content and delete the file:
    http://msdn.microsoft.com/en-us/library/twss4wb0&#37;28v=vs.90%29.aspx
  9. Replies
    4
    Views
    321

    Re: Text Replacing code

    As long as there's no intersection (like in this case), you can simply call the Replace method twice.


    string strResult0 = strValue.Replace("D", "Delta");
    strResult0 = strValue.Replace("d",...
  10. Replies
    6
    Views
    1,203

    Re: JSON Serialization

    I mean you should read it - say, like this:


    System.Diagnostics.Debug.WriteLine(response.GetResponseStream().ReadToEnd());
  11. Re: Error:cannot convert 'Command.CommandType' to'System.Data.CommandType'

    Changing the name of CommandType is also an option.
    However, what I meant is that you need to replace the following two lines


    private CommandType cmdType;
    public CommandType CommandType
    {
    ...
  12. Re: Error:cannot convert 'Command.CommandType' to'System.Data.CommandType'

    Where is the definition of CommandType?

    The error probably occurs because when you write


    private CommandType cmdType;

    It is actually equivalent to
  13. Re: Error:cannot convert 'Command.CommandType' to'System.Data.CommandType'

    What is CommandType? Is this a built-in enum, or was it implemented by you?
    Also, what is the type of Command.CommandType?
  14. Re: Error:cannot convert 'Command.CommandType' to'System.Data.CommandType'

    On what line does this error occur?
    Also, what is CommandType? Is this a built-in enum, or was it implemented by you? What about Command?
  15. Replies
    6
    Views
    1,203

    Re: JSON Serialization

    Forget a second about JSON - read the content returned by your server(i.e., the content of the stream returned by response.GetResponseStream()). What is its content?
  16. Replies
    6
    Views
    1,203

    Re: JSON Serialization

    The first thing you need to do is to figure out where the problem is - is in your code, or is it in the input JSON content provided by the server?
    What is the JSON content returned by your request?...
  17. Replies
    3
    Views
    815

    Re: Using a Background Worker with a class

    There's no magic - the computer can't guess how much time your method will take to run. You need to report as-you-go from within the external method.
    For example, if there's a for loop of 10...
  18. Replies
    3
    Views
    815

    Re: Using a Background Worker with a class

    Of course you can... just call the routine of the external class from within the BackgroundWorker's DoWork event.
  19. Replies
    6
    Views
    1,322

    Re: Using 'sender' in switch statement

    This might work:


    switch (sender)
    {
    case (object)Pentagon:
    break;
    case (object)Hexagon:
    break;
    }
  20. Re: How to remember data after the program is closed?

    You don't need to create the file in advance, just create the file in the code.
    In fact, you don't need to do anything different, because the StreamWriter class creates an empty file if the file (in...
  21. Re: How to remember data after the program is closed?

    There are lots of ways to save data:
    -using Settings
    -write the data to files, and then read it
    -save the data in a Database

    In your case (highscore), writing to top scores to a file (either a...
  22. Replies
    6
    Views
    1,322

    Re: Using 'sender' in switch statement

    What is Pentagon (or Hexagon)? Is this an object of a class, or a name of a class?
    Attach the definition of Pentagon & Hexagon please.
  23. Replies
    2
    Views
    1,434

    Re: even odd numbers using foreach

    //print the even numbers between 0 and 100
    for(int i=0;i<=50;i++)
    Console.WriteLine(2*i);

    Or:


    //print the odd numbers between 0 and 100
    foreach(int i in Enumerable.Range(0, 50))
    ...
  24. Replies
    3
    Views
    452

    Re: Pointer Workaround

    There are two options to do that:
    1. Define the Ship as a struct (yes, there are structs in C#). By doing that, the line testShip2 = testShip1; will actually copy the content of testShip1 into...
  25. Replies
    1
    Views
    2,439

    Re: pop up message in asp.net using C#

    It can be accomplished by using javascript's alert:


    //Somewhere in your code...
    Response.Write("<script langauge=\"javascript\">alert(\"Your data was inserted successfully\");</script>");
Results 1 to 25 of 492
Page 1 of 20 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center