|
Ever tried to make an property with the type of what you think should be Nullable<Single> a.k.a. Single?.
CodeDom will make cast this as Nullable<float>.
In short i cant seem to find anything on the net about this bug.
heres an test script:
CodeMemberProperty MyProperty = new CodeMemberProperty();
MyProperty.Type = new CodeTypeReference(typeof( Nullable<Single> ));
MyProperty.Name = "MySingleValue";
MyProperty.Attributes = MemberAttributes.Public | MemberAttributes.Final;
this will generate this:
public Nullable<float> MySingleValue
{
...
}
Has anyone any fix for this ???
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
|
well excuse me, for using that word...
I do know atbout the float/single. but thats not my point. read my entry again... if you dont get, what im trying to point out here.
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
Paw Jershauge wrote: if you dont get, what im trying to point out here.
Are you trying to make it sealed?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I read it again, you're missing the point. float is C# syntactic sugar for the .NET type System.Single . They are one and the same thing.
If you're wondering why CodeDom changes your definition of float to System.Single its because CodeDom is language agnostic and the float keyword is only relevant to C#
|
|
|
|
|
UPS!!!!!
I did actualy find the solution to this... its because im an old VB developer but havent been using this for some years now...
Single is float in C# terms BUT in VB.Net its still Single.
So if i look in the VB generated code its an Single and in the C# generated code its Float.
My mistake...
I let it rest here...
Thanks for hammering my head, with the correct answer...
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
Ok, I read it again. What do you not understand that System.Single is identical to float?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hello everyone,
I am using IIS 6.0 and I am going to using the built-in function of basic authentication of IIS.
To authenticate, we must have user name and password. After some search, I am still confused where are the user name and password coming from? From Windows existing user account or somewhere else?
thanks in advance,
George
|
|
|
|
|
You can create user accounts on the machine or domain and then assign the security to the directories using standard windows security features. Basic authentication is not recommended for domain accounts as they are sent in plain text. BTW, I think this is a web dev question.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Hi Ennis,
1.
I understand how to create user account for local machine, but how to create user account for a domain? Any guides or documents?
2.
"assign the security to the directories using standard windows security features" -- not sure which management function do you mean, confused -- both Windows Server and IIS has a couple of various account management dialogs. Could you post some links or documents about what do you mean "assign the security to the directories using standard windows security features" please?
regards,
George
|
|
|
|
|
|
Hi leppie,
The GUI of this site looks fancy, but a little messy information on this site. This site is specialized for what topics?
regards,
George
|
|
|
|
|
Title says it all really, is it possible to call a .NET 2 library from a .NET 1.1 library?
The obvious and immediate answer is no, as the 1.1 library will be running in a 1.1 AppDomain that does not include the 2.0 framework. However is there anyway to "bridge" across, maybe remoting/custom socket server?
modified on Thursday, September 25, 2008 8:47 AM
|
|
|
|
|
Haven't tested Remoting (although I think it is possible) but low level socket communication is definitely functioning.
Robert
|
|
|
|
|
I mean, why not.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
I like the cut of your jib, however....
When I find a hack frig solution this will be deployed out to over 10 thousand servers and unfortunately the current build of these does not have MSMQ installed. Installing this as part of the deployment process is not feasible.
|
|
|
|
|
I am writing one simple C# application; which is used to read contents of web page.
While reading from the URL which first requires to log in.
Is there anyway that i can set user and password, and can read data from this page.
Thanks,
Perry
|
|
|
|
|
Which class are you using to read webpages? If it is HttpWebRequest, then have a look at Credentials property.
|
|
|
|
|
I tried setting Credentials with my user and password .. still it reads login page ...
|
|
|
|
|
I am not sure but try setting PreAuthenticate property to true.
|
|
|
|
|
No success with this too ...
|
|
|
|
|
is there any way to Read/Write to a Column Description in a MSAccess Table?
example
Im writing an application for an industrial control that i have created a plugin for.
I want to be able to read from the comment for a column to use the information for setting certain events.
I am able to read/write to rows, columns,etc but unable to read the description and it would help me greatly.
|
|
|
|
|
Hi all,
I am developing a couple of web services for work. Most of the methods return custom classes but I want one of them to just return a 'string' (either "OK" or "NOTOK").
The problem is that, whilst with custom classes the webservice's XML's tags are named according to the variable name (for example: <hotelsummary><hotelid>5 ... where HotelSummary is a type but HotelID is the variable name), with strings the XML returned is <string>OK.
Is it possible to rename the tags to display, for example, <hotelcheck>OK instead of the datatype?
Thanks a lot.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
il_manti wrote: but I want one of them to just return a 'string' (either "OK" or "NOTOK").
Why not use bool then? Return True/false
il_manti wrote: Is it possible to rename the tags to display, for example, OK instead of the datatype?
I don't think you can rename it. I am not sure though.
|
|
|
|
|
First, unless you are planning on expanding your status messages later, I would suggest using a boolean.
Second, sounds like you might be able to use an enumeration for this:
public enum Status
{
OK,
NOTOK
}
Then you would be able to say Status.OK or Status.NOTOK
Hope this helps,
Chris
|
|
|
|