|
string message = "!dlrow olleH";<br />
char[] temp = message.ToCharArray();<br />
Array.Reverse(temp);<br />
message = new string(temp);
---
b { font-weight: normal; }
|
|
|
|
|
nice and short
good work
|
|
|
|
|
If you want extra credit in the class, use recursion.
|
|
|
|
|
hi all,
this is my first mail to the forum...Plz let me know the answer for this ASAP.
here is my Problem:
public class R01Struct {
/// <remarks>
public AnImpositionType Annee;
/// <remarks>
public string NoReleve;
/// <remarks>
public R01StructIdentification Identification;
/// <remarks>
public Adresse2Struct Adresse;
/// <remarks>
public R01MntStruct Montants;
}
public class R01StructIdentification {
/// <remarks>
[System.Xml.Serialization.XmlElementAttribute("RaisonSociale", typeof(R01StructIdentificationRaisonSociale))]
[System.Xml.Serialization.XmlElementAttribute("Employe", typeof(R01StructIdentificationEmploye))]
public object Item;
}
public class R01StructIdentificationEmploye {
/// <remarks>
public string NAS;
/// <remarks>
public string No;
/// <remarks>
public string NomFamille;
/// <remarks>
public string Prenom;
/// <remarks>
public string Initiale;
}
there are two classes in one of my code files in my c#window application.my problem is i am trying to acces the content of the "R01StructIdentificationEmploye" by taking a varible of type R01Struct.
here is my old code when the identification class was not there.
((R01Struct)REL1.Items[i]).Employe.NAS = row["NAS"].ToString()"" ? "000000000" : row["NAS"].ToString();
pls give me the solution as soon as possible
vamsee krishna
|
|
|
|
|
Are you creating an instance of that class in your R01Struct contructor?
|
|
|
|
|
hi
I'm working a windows application project in C# and I was wondering how can we make or use icons for our application u know. It requires .ICO file and many softwares dont sopport making these so what should I do.
do u know of any site where some good icons are available or somethin like that
thanks in advance
Rocky
|
|
|
|
|
u can get it from any book of C# like of deitel,where code and idea is given to place information,exclamation,error and other icons on application.
|
|
|
|
|
AS a (bad) workaround, you can place a bmp is your resources and convert it into an icon:
Bitmap bmp = (Bitmap)resources.GetObject("myBMP.bmp");
IntPtr Hicon = bmp.GetHicon();
Icon newIcon = Icon.FromHandle(Hicon);
Then do what you want with it.
|
|
|
|
|
thats good but isnt there anyway we can make these icon files easily.
I'll try that surely...
thanks a lot
Rocky
|
|
|
|
|
I'm trying to implement message queuing in C# .net using MQSeries .. I have the Websphere server installed on a machine and i've tried implementing queuing on that machine .Local queuing without using channel information works fine on the machine where the server is installed .I tried installing MQ client on the client machine but it still is unable to connect.Everytime i try to connect to the system remotely and access the queues , i get an error saying dll not found.I tried to resolve this by copying all dlls frm the bin folder of the MQ client to system32 but that didnt help.
The exception is raised when the queue manager object is initialized . Even when i try to connect to the server from the same machine using channels ,it gives an MQRC_Environment_error .. or MQCONN error.Does anyone have a solution ??
Jake
|
|
|
|
|
I am Coming accross the problem "attempt to store an element of the incorrect type into the array "when i tried to add my UI during the design time.Please tell me what am i need to do overcome this problem.Thanks in advance
Regards,
Guru
|
|
|
|
|
Can you please be little more specific what exactly you want and what exactly you have done. Does problem mean exception? Try to exlplain in details, so that somebody can suggest right solution.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
Too vague to help you. What exactly are you doing (include steps)? What is the exception that occurs?
|
|
|
|
|
what is virtual method,dynamic method,static method
|
|
|
|
|
What is homework ?
What is google ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Virtual methods are those methods which you want to call using base class object with derived class reference.
namespace SomeCorpProject
{
public class BaseBusinessObject
{
public BaseBusinessObject()
{
}
public virtual void VirtualMethod()
{
Console.WriteLine("Virtual method");
}
public override string ToString()
{
return "BaseBusinessObject";
}
}
}
namespace SomeCorpProject
{
public class Capacitor : BaseBusinessObject
{
public Capacitor()
{
}
public static void StaticMethod()
{
Console.WriteLine("I am static, no need to create object of class.");
}
public override void VirtualMethod()
{
Console.WriteLine("In derived virtual method");
base.VirtualMethod();
}
public override string ToString()
{
return "Capacitor";
}
}
}
namespace SomeCorpProject
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
BaseBusinessObject bizObj = new Capacitor();
bizObj.VirtualMethod();
Capacitor.StaticMethod();
System.Console.WriteLine(bizObj.ToString());
}
}
}
The above code will explain most of the concepts. Static methods are those methods for which object of the class need not to be created. They share the common info across all class objects. They are loaded in the memory before class gets loaded. Dynamic methods? I do not have idea. But I think they might be instance methods. i.e. you should create an object of the class to call these methods.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
jdkulkarni wrote: Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
Wow - is that worth something in parts of the world ?
I wouldn't have given the answer, because all you're doing is teaching this person to not do their own homework. I hope he ends up working in the cubicle next to you and not near me.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
As far as hand feeding, I couldn't agree more. Unfortunately, I think I do sit next to him
|
|
|
|
|
Just adding a little, virtual methods can be overwritten in a derived class (by using overwrite keyword) but is not mandatory. Also you can have a method with the same name as the one in a parent class and hide it with a technique called shadowing (by using new keyword).
modified 17-Jul-19 21:02pm.
|
|
|
|
|
Have you heard of MSDN ??
Regards,
Bhupi Bhai.
|
|
|
|
|
In my current project I want to replace a library I'm using by an other one I will write my self.
1st I want to write a skeletton library which feature all type/method I'm using (with no real code inside).
For that I would like to go through my project, track every library object I'm using and all the method I'm calling and create a mock-up library where I would define all the types and and methods I'm using from the 3rd party lib.
The thing is I would like to do it automatically through someting like reflection.
Is there a way I could do that simply? Any tips or links?
Here is an example, current code below
class MyProject
{
void AMethod(ALibObject1 obj)
{
obj.Method1();
ALibObject2 o2 = obj.Method2();
o2.Method3(new LibObject3());
}
}
I want to go through the code (or probably compiled assembly) above (automatically), by using reflection on the assembly (or something similar) and produce:
public class ALibObject1
{
public void Method1() {}
ALibObject2 Method2() { return null; }
}
public class ALibObject2
{
public void Method3(LibObject3 obj) {}
}
public class LibObject3
{
}
Any tip on how to do that simply in an automated way?
|
|
|
|
|
|
|
Hi,
After I copy and paste some excel cells into a richTextBox in window form, how can I edit the excel data in the richTextControl, so that it can reflect the changes back in the excel source ?
Thanks
|
|
|
|