Thread View: borland.public.delphi.language.delphi.dotnet
2 messages
2 total messages
Started by VT Venkatesh
Tue, 10 Jun 2008 02:07
AuthorizationRuleAction type showing different properties/methods in C# & delphi
Author: VT Venkatesh
Date: Tue, 10 Jun 2008 02:07
Date: Tue, 10 Jun 2008 02:07
12 lines
1456 bytes
1456 bytes
I am able to do the following in C# rule.Action.ToString().ToUpper() where rule is of type System.Web.Configuration.AuthorizationRule and Action of type AuthorizationRuleAction How ever I find that Action of type AuthorizationRuleAction has only two members Allow & Deny but still in code completion in C# Action shows up ToString property & does not show up Allow & Deny ) How ever the same thing is not possible in Delphi i.e. no Tostring method & code completion shows up only Allow & Deny I though all net types can use ToString method ? Venkatesh
Re: AuthorizationRuleAction type showing different properties/methodsin C# & delphi
Author: VT Venkatesh
Date: Tue, 10 Jun 2008 07:23
Date: Tue, 10 Jun 2008 07:23
18 lines
1788 bytes
1788 bytes
VT Venkatesh wrote: > I am able to do the following in C# > rule.Action.ToString().ToUpper() > where rule is of type System.Web.Configuration.AuthorizationRule and > Action of type AuthorizationRuleAction > > How ever I find that Action of type AuthorizationRuleAction has only two > members Allow & Deny but still in code completion in C# Action shows up > ToString property & does not show up Allow & Deny ) > How ever the same thing is not possible in Delphi i.e. no Tostring > method & code completion shows up only Allow & Deny > I though all net types can use ToString method ? > Venkatesh I got the answer myself.It would be useful to others too.Since 'Action' is of type enumeration the it has to be cast as System.enum Hence the correct syntax is System.Enum(role.Action ).ToString Venkatesh
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads