|
The Interfaces seem absolutely fine to me. And I was just demonstrating how I would implement those interfaces in a base class.
|
|
|
|
|
does this help
class Program
{
static void Main(string[] args)
{
Three inst = new Three();
inst.Name = "Hello";
IOne foo = new Three();
ITwo bar = new Three();
bar.Name = "Hello";
}
}
public interface IOne
{
string Name { get; }
}
public interface ITwo : IOne
{
new string Name { get;set; }
}
public class Three : ITwo
{
private string _name;
#region ITwo Members
public string Name
{
get
{
return _name;
}
set
{
_name = value;
}
}
#endregion
}
|
|
|
|
|
I think it is a new error message in the 2005 and later version of the compiler. I think the 1.1 allows this. The best way, I have found, to get around this error is to create another common interface such as IHasFirstPaymentDate. Then IBaseObject and ICalculateable can both inherit without the warning.
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.
|
|
|
|
|
Say i have the following
public class CollageClass
{
public List<Student> Students{ get; set; }
public string Name { get; set; }
public string RoomNumber{ get; set; }
}
public class Student
{
public string Name { get; set; }
public int Age{ get; set; }
public int BestGrade{ get; set; }
}
nice and simple, now i want to create a report, to display the CollageClass info at the top of the page and the students info under.
How is the best/easyest way to do this? i was going to make a crystal report, but i cant just give it my instance of CollageClass. If i used crystal, i was thinking of making a strongly typed dataset to match the contents of the class, populate that and then bind the report to it, is this the correct way to do this? (just seems like a lot of work as my class is much bigger than the above example)
i dont normally make many reports, so this is kinda a bit new to me
Regards
Mark
|
|
|
|
|
That is the way I do it. It may sound like a lot of work but crystal is quirky unless you do things there way.
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 mark,
i don´t know if that works for you, my coding different
static string _image_path;
public static string Image_Path
{
get { return _image_path; }
set { _image_path = value; }
}
but, were is the database?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
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 ...
|
|
|
|