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. General Programming
  3. C#
  4. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C#
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.
  • V Offline
    V Offline
    vahidha
    wrote on last edited by
    #1

    [Message Deleted]

    M P M 3 Replies Last reply
    0
    • V vahidha

      [Message Deleted]

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      vahidha wrote:

      I need java code for that purpose

      And you are asking for that in a C# forum???:confused:

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      1 Reply Last reply
      0
      • V vahidha

        [Message Deleted]

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        A few points.

        vahidha wrote:

        Its very urgent..

        Not for me it isn't. I couldn't care less.

        vahidha wrote:

        I need java code for that purpose

        If you can't tell the difference between C# and Java, you're not even qualified to stuff envelopes for a living.

        vahidha wrote:

        I need java code

        This isn't rentacoder - we don't write your code for you here. We expect you to get off your lazy ass and write it yourself. We'll help if you get stuck, but as we don't get your pay check, we don't do your job.

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

        My blog | My articles | MoXAML PowerToys | Onyx

        1 Reply Last reply
        0
        • V vahidha

          [Message Deleted]

          M Offline
          M Offline
          Mbah Dhaim
          wrote on last edited by
          #4

          this your code

          try
          {
          if (!question.ToUpper().Contains("C#")){
          throw new WrongForumException("You are in wrong forum.");
          }
          if (question.ToUpper().Contains("URGENT")){
          throw new NotYourSlaveException("We are not your slave dud.");
          }
          SomeBodyWillTryToAnswerYourQuestion();
          }
          catch (Exception ex)
          {
          Console.WriteLine("Nice try, but "+ ex.Message +" raised");
          }

          hope it will open your mind.

          dhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support

          E 1 Reply Last reply
          0
          • M Mbah Dhaim

            this your code

            try
            {
            if (!question.ToUpper().Contains("C#")){
            throw new WrongForumException("You are in wrong forum.");
            }
            if (question.ToUpper().Contains("URGENT")){
            throw new NotYourSlaveException("We are not your slave dud.");
            }
            SomeBodyWillTryToAnswerYourQuestion();
            }
            catch (Exception ex)
            {
            Console.WriteLine("Nice try, but "+ ex.Message +" raised");
            }

            hope it will open your mind.

            dhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support

            E Offline
            E Offline
            Ennis Ray Lynch Jr
            wrote on last edited by
            #5

            Not to be pedantic but you really shouldn't swallow exceptions. If you are going to swallow the exceptions then you probably don't need to throw them. An if statement is way more appropriate.

            Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            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