download the attachment file Click Here
Steven Pinto2000
Posts
-
simple chat page -
abstarct class basic question [modified]what is K is it KM well i can see KM try it once more because there was some error in my code
-
abstarct class basic question [modified]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace general { class Program { static void Main(string[] args) { D1 myClass = new D1(); D1 newClass = myClass.Create(); //this is what I would like b myClassAb = new D1(); b newClassAb = myClassAb.Create<D1>(); newClass.KM = 1.23; } } abstract class b { //work in this way !!! public T Create<T>() where T:new() { return new T(); } } class D1 : b { public double KM; public D1() { KM = 1.0; } // public D1 Create() { return new D1(); } } class D2 : b { public double KM; public D2() { KM = 2.0; } // public D2 Create() { return new D2(); } } } here is one solution using generics
modified on Wednesday, June 1, 2011 9:53 AM
-
simple chat pagethe best way is to use a update pannel the advantage is that the user will not even come to know that the page is posted back as it uses AJAX and the text box will not go empty as well
-
How to input class name by user?There is a class called MethodInfo where in you will get all the info of the methods in the object and i would suggest you to learn this from any forums because it would help you more to learn about it like we could only guide you how to do a particular thing it would be good for you to learn new things
-
How to input class name by user?Type type = Type.GetType("abc");
object obj = Activator.CreateInstance(type);pass the class name in the GetType function if the class has a namespace pass it with the namespace.classname rate me if this post was helpful
modified on Monday, May 9, 2011 6:51 AM
-
New to C# - struggling with links + functions + ... etc etc !Sorry Sir i am just new at it
modified on Thursday, May 5, 2011 6:11 AM
-
New to C# - struggling with links + functions + ... etc etc !See this wud work for sure System.Diagnostics.Process.Start(((LinkLabel)sender).Text); :cool:
modified on Thursday, May 5, 2011 5:58 AM
-
default value in comboboxUse combobox SelectedIndex to select the default value in the combobox:cool:
-
How to input class name by user?Use reflections in C# with reflections u can store the class name in a string and then create the object of that class at run time Click Here:cool:
modified on Wednesday, May 4, 2011 1:48 AM