Click here to Skip to main content
15,881,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: @ # ~ signs in Responce.Redirect? Pin
Pete O'Hanlon18-Sep-07 10:25
mvePete O'Hanlon18-Sep-07 10:25 
AnswerRe: @ # ~ signs in Responce.Redirect? Pin
Guffa18-Sep-07 8:35
Guffa18-Sep-07 8:35 
QuestionPing pong Pin
netJP12L18-Sep-07 6:45
netJP12L18-Sep-07 6:45 
AnswerRe: Ping pong Pin
Not Active18-Sep-07 7:01
mentorNot Active18-Sep-07 7:01 
GeneralRe: Ping pong Pin
netJP12L18-Sep-07 8:30
netJP12L18-Sep-07 8:30 
GeneralRe: Ping pong Pin
Not Active18-Sep-07 8:49
mentorNot Active18-Sep-07 8:49 
GeneralRe: Ping pong Pin
netJP12L19-Sep-07 4:01
netJP12L19-Sep-07 4:01 
QuestionCustom Attribute : simple question Pin
Sha Sea18-Sep-07 5:29
Sha Sea18-Sep-07 5:29 
Hi to All Champions,

Im using Visual Studio 2005 and .Net 3.0. I'm not able to execute Custom Attribute class.
Below is the code.
Code should work because MyAttribute is associate with SayHello(). Since it is associated , it should execute constructor of MyAttribute(). But its not working.D'Oh! | :doh:

<br />
using System;<br />
   [AttributeUsage(AttributeTargets.Method|AttributeTargets.Struct]<br />
   public class MyAttribute:Attribute<br />
   {<br />
      private string regKey="abc";<br />
      public MyAttribute(string regKey)<br />
      {<br />
         if(this.regKey==regKey)<br />
         {<br />
            Console.WriteLine("Permitted to use this App");<br />
         }<br />
         else<br />
         {<br />
            Console.WriteLine("Not registered to use this App");<br />
         }<br />
      }<br />
   }    //End Attribute class code<br />
   class useAttrib<br />
   {<br />
      [MyAttribute("hello")]<br />
      public static string SayHello(string str)<br />
      {<br />
         return str;<br />
      }<br />
      static void Main()<br />
      {<br />
         Console.WriteLine(SayHello("Hello to Sufyan"));<br />
         Console.ReadLine();<br />
      }<br />
   }<br />


Thanks,
sha
AnswerRe: Custom Attribute : simple question Pin
Pete O'Hanlon18-Sep-07 22:47
mvePete O'Hanlon18-Sep-07 22:47 
Questionmanaging different instance of application Pin
KrunalC18-Sep-07 4:19
KrunalC18-Sep-07 4:19 
QuestionDelete Query problems Pin
Jon Stroh18-Sep-07 3:26
Jon Stroh18-Sep-07 3:26 
AnswerRe: Delete Query problems Pin
led mike18-Sep-07 4:21
led mike18-Sep-07 4:21 
GeneralRe: Delete Query problems Pin
Jon Stroh18-Sep-07 6:07
Jon Stroh18-Sep-07 6:07 
GeneralRe: Delete Query problems Pin
Jon Stroh18-Sep-07 19:54
Jon Stroh18-Sep-07 19:54 
QuestionScheduling the start of a web service Pin
Albu Marius18-Sep-07 2:02
Albu Marius18-Sep-07 2:02 
AnswerRe: Scheduling the start of a web service Pin
Pete O'Hanlon18-Sep-07 2:26
mvePete O'Hanlon18-Sep-07 2:26 
GeneralRe: Scheduling the start of a web service Pin
Albu Marius18-Sep-07 2:36
Albu Marius18-Sep-07 2:36 
GeneralRe: Scheduling the start of a web service Pin
Not Active18-Sep-07 2:48
mentorNot Active18-Sep-07 2:48 
GeneralRe: Scheduling the start of a web service Pin
led mike18-Sep-07 4:24
led mike18-Sep-07 4:24 
GeneralRe: Scheduling the start of a web service Pin
Not Active18-Sep-07 5:43
mentorNot Active18-Sep-07 5:43 
GeneralRe: Scheduling the start of a web service Pin
led mike18-Sep-07 6:22
led mike18-Sep-07 6:22 
GeneralRe: Scheduling the start of a web service Pin
Not Active18-Sep-07 6:30
mentorNot Active18-Sep-07 6:30 
GeneralRe: Scheduling the start of a web service Pin
led mike18-Sep-07 6:41
led mike18-Sep-07 6:41 
AnswerRe: Scheduling the start of a web service Pin
Dave Kreskowiak18-Sep-07 6:17
mveDave Kreskowiak18-Sep-07 6:17 
AnswerRe: Scheduling the start of a web service Pin
Albu Marius18-Sep-07 22:34
Albu Marius18-Sep-07 22:34 

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.