Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. This did not serve it's intended purpose

This did not serve it's intended purpose

Scheduled Pinned Locked Moved The Weird and The Wonderful
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    0bx
    wrote on last edited by
    #1
        private string Format(string data, Dictionary properties)
        {
            foreach (string key in properties.Keys)
            {
                data = data.Replace(key, data);
            }
            return data;
        }
    

    .

    OriginalGriffO M D A 4 Replies Last reply
    0
    • 0 0bx
          private string Format(string data, Dictionary properties)
          {
              foreach (string key in properties.Keys)
              {
                  data = data.Replace(key, data);
              }
              return data;
          }
      

      .

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Unless it's purpose was to waste time and memory? :laugh:

      Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • 0 0bx
            private string Format(string data, Dictionary properties)
            {
                foreach (string key in properties.Keys)
                {
                    data = data.Replace(key, data);
                }
                return data;
            }
        

        .

        M Offline
        M Offline
        mikepwilson
        wrote on last edited by
        #3

        It compiles. Ship it!

        1 Reply Last reply
        0
        • 0 0bx
              private string Format(string data, Dictionary properties)
              {
                  foreach (string key in properties.Keys)
                  {
                      data = data.Replace(key, data);
                  }
                  return data;
              }
          

          .

          D Offline
          D Offline
          Duncan Edwards Jones
          wrote on last edited by
          #4

          As a bug addict[^], I see this type a lot!

          1 Reply Last reply
          0
          • 0 0bx
                private string Format(string data, Dictionary properties)
                {
                    foreach (string key in properties.Keys)
                    {
                        data = data.Replace(key, data);
                    }
                    return data;
                }
            

            .

            A Offline
            A Offline
            Adam R Harris
            wrote on last edited by
            #5

            Would have been better as an extension method.

            Don't comment your code - it was hard to write, it should be hard to read!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups