Sno | CCW | RCW |
1 | COM to .NET communication happens through COM Callable Wrapper | .NET to COM Communication happens through Remote Callable Wrappter |
What is the difference between CCW and RCW ?
Saturday, June 27, 2009
Labels:
.net,
.net framework,
c#.net,
COM,
Differences,
vb.net
What is the difference between CCW and RCW ?
Sno | CCW | RCW |
1 | COM to .NET communication happens through COM Callable Wrapper | .NET to COM Communication happens through Remote Callable Wrappter |
Labels:
.net,
.net framework,
c#.net,
COM,
Differences,
vb.net
How to invoke a method at runtime using Reflection in c#?
You need to call “InvokeMember” method of Reflection to do this.
Let us see this in detail with an example,
1. Create a Class library program and paste the code below,
Reflection Source Program
=========================
using System;
using System.Collections.Generic;
using System.Text;
namespace Employee
{
public class EmployeeDetails
{
private int empid=1;
private string empname="Ram";
private float salary=100000;
public string displayEmployeeDetails()
{
return "Empoyee Id:" + empid + "
" + "Empoyee Name:" + empname + "
" + "Empoyee salary:" + salary + "
";
}
}
}
2. compile it.
3. then create a windows application project and paste the following code
Reflection Program to invoke the method
==================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Employee;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Assembly assembly = Assembly.LoadFrom("E:\\WebExperiments\\Employee\\Employee\\bin\\Debug\\Employee.dll");
foreach (Type type in assembly.GetTypes())
{
// Pick up a class
if (type.IsClass == true)
{
Console.WriteLine("...Found Class : {0}", type.FullName);
}
object ibaseObject = Activator.CreateInstance(type);
object result = null;
result = type.InvokeMember("displayEmployeeDetails",
BindingFlags.Default | BindingFlags.InvokeMethod,
null,
ibaseObject, null);
MessageBox.Show(result.ToString() );
}
}
}
}
4. add reference to the Employee dll
5. run the program and see the method invoked.
How to invoke a method at runtime using Reflection in c#?
You need to call “InvokeMember” method of Reflection to do this.
Let us see this in detail with an example,
1. Create a Class library program and paste the code below,
Reflection Source Program
=========================
using System;
using System.Collections.Generic;
using System.Text;
namespace Employee
{
public class EmployeeDetails
{
private int empid=1;
private string empname="Ram";
private float salary=100000;
public string displayEmployeeDetails()
{
return "Empoyee Id:" + empid + "
" + "Empoyee Name:" + empname + "
" + "Empoyee salary:" + salary + "
";
}
}
}
2. compile it.
3. then create a windows application project and paste the following code
Reflection Program to invoke the method
==================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Employee;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Assembly assembly = Assembly.LoadFrom("E:\\WebExperiments\\Employee\\Employee\\bin\\Debug\\Employee.dll");
foreach (Type type in assembly.GetTypes())
{
// Pick up a class
if (type.IsClass == true)
{
Console.WriteLine("...Found Class : {0}", type.FullName);
}
object ibaseObject = Activator.CreateInstance(type);
object result = null;
result = type.InvokeMember("displayEmployeeDetails",
BindingFlags.Default | BindingFlags.InvokeMethod,
null,
ibaseObject, null);
MessageBox.Show(result.ToString() );
}
}
}
}
4. add reference to the Employee dll
5. run the program and see the method invoked.
Cystal Report Links
www.codeproject.com/KB/cs/CreatingCrystalReports.aspx
http://www.c-sharpcorner.com/Articles/ArticleListing.aspx?SectionID=1&SubSectionID=61
http://www.programmersheaven.com/download/44243/download.aspx
http://www.crystalreportsbook.com/Crystal_Reports_Net_Ch14_4.asp
Labels:
.net,
asp.net,
c#.net,
Crystal Reports,
vb.net
Cystal Report Links
www.codeproject.com/KB/cs/CreatingCrystalReports.aspx
http://www.c-sharpcorner.com/Articles/ArticleListing.aspx?SectionID=1&SubSectionID=61
http://www.programmersheaven.com/download/44243/download.aspx
http://www.crystalreportsbook.com/Crystal_Reports_Net_Ch14_4.asp
Labels:
.net,
asp.net,
c#.net,
Crystal Reports,
vb.net
mcse tutorial
Friday, June 26, 2009
www.intelligentedu.com/newly.../MCSE_Windows2000.html
www.mcsetutorialsonline.com
apex.vtc.com/mcse-bundle.php
www.velocityreviews.com/.../t237762-online-mcse-tutorial.html
www.learnthat.com/.../learn-430-windows_cp_mcse_practice_exam.htm
www.self-certify.com/mcse-tutorial.asp
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.skills_assessment&tid=bcee1d4b-e637-4ee6-989b-74acbe5efddb&cat=en_US_0d692642-c6e2-49ae-92c9-59a79e4fd247&lang=en&cr=US&sloc=&p=1
www.softwaretrainingtutorials.com/mcse-2003.php
Labels:
Tutorials
Subscribe to:
Posts (Atom)