Click here to Skip to main content
15,889,604 members
Home / Discussions / C#
   

C#

 
GeneralWatermarking an image, with embossed Effect & Colors of text should be same as source image have Pin
adnanrafiq16-Mar-08 21:01
adnanrafiq16-Mar-08 21:01 
GeneralAttempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
D i x y16-Mar-08 20:34
D i x y16-Mar-08 20:34 
GeneralRemoving Data from Excel Worksheet Pin
meeram39516-Mar-08 19:42
meeram39516-Mar-08 19:42 
GeneralAutogenerated Number Pin
sandipchandra17@gmail.com16-Mar-08 19:11
sandipchandra17@gmail.com16-Mar-08 19:11 
GeneralRe: Autogenerated Number Pin
Christian Graus16-Mar-08 19:47
protectorChristian Graus16-Mar-08 19:47 
GeneralRe: Autogenerated Number Pin
Ravenet16-Mar-08 20:19
Ravenet16-Mar-08 20:19 
QuestionRe: Autogenerated Number Pin
CPallini17-Mar-08 0:35
mveCPallini17-Mar-08 0:35 
QuestionEvents and delegates Pin
Pankaj Garg16-Mar-08 19:09
Pankaj Garg16-Mar-08 19:09 
Following is the code that illustrates the use of events and delegates.
There is a common thing that is use by both the event and delegates.
I know the basic differece between them (events can be declared in the interfaces.)
But in the following example , I think , I can simply go with only delegates , and no need to use the events

using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication1<br />
{<br />
    public partial class Form1 : Form<br />
    {<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            d ddd = new d();<br />
            ddd.sd(20);<br />
            ddd.fireevent(10);<br />
        }<br />
    }    <br />
}<br />
<br />
namespace WindowsApplication1<br />
{<br />
    public delegate void smartdelegate(int i);<br />
    public class d<br />
    {<br />
        public smartdelegate sd;<br />
        public event smartdelegate smartEvent;<br />
        public void fireevent(int i)<br />
        {<br />
            smartEvent(i);<br />
        }<br />
        public d()<br />
        {<br />
            sd = new smartdelegate(aa);<br />
            smartEvent = new smartdelegate(aa);<br />
        }<br />
<br />
        private void aa(int i)<br />
        {<br />
            System.Windows.Forms.MessageBox.Show(i.ToString());<br />
        }<br />
    }<br />
}


If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!

GeneralRe: Events and delegates Pin
Christian Graus16-Mar-08 19:46
protectorChristian Graus16-Mar-08 19:46 
QuestionHow to pop-up connect to dialog box in C# Pin
jdkulkarni16-Mar-08 18:45
jdkulkarni16-Mar-08 18:45 
QuestionReading the path of a file in C# - URGENT!! Pin
Phivos Stylianides16-Mar-08 17:52
Phivos Stylianides16-Mar-08 17:52 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
PIEBALDconsult16-Mar-08 18:06
mvePIEBALDconsult16-Mar-08 18:06 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
Christian Graus16-Mar-08 18:44
protectorChristian Graus16-Mar-08 18:44 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
Ravenet16-Mar-08 20:21
Ravenet16-Mar-08 20:21 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
Phivos Stylianides16-Mar-08 20:34
Phivos Stylianides16-Mar-08 20:34 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
Ravenet16-Mar-08 20:46
Ravenet16-Mar-08 20:46 
GeneralRe: Reading the path of a file in C# - URGENT!! Pin
Phivos Stylianides16-Mar-08 21:06
Phivos Stylianides16-Mar-08 21:06 
GeneralStart Menu help [modified] Pin
Mabre of the Tadadas16-Mar-08 13:32
Mabre of the Tadadas16-Mar-08 13:32 
GeneralRe: Start Menu help Pin
Not Active16-Mar-08 14:00
mentorNot Active16-Mar-08 14:00 
GeneralRe: Start Menu help Pin
Mabre of the Tadadas16-Mar-08 14:03
Mabre of the Tadadas16-Mar-08 14:03 
GeneralRe: Start Menu help Pin
Anthony Mushrow16-Mar-08 14:42
professionalAnthony Mushrow16-Mar-08 14:42 
GeneralRe: Start Menu help Pin
Mabre of the Tadadas16-Mar-08 14:50
Mabre of the Tadadas16-Mar-08 14:50 
GeneralRe: Start Menu help Pin
Anthony Mushrow16-Mar-08 16:17
professionalAnthony Mushrow16-Mar-08 16:17 
GeneralRe: Start Menu help Pin
Not Active16-Mar-08 16:22
mentorNot Active16-Mar-08 16:22 
GeneralRe: Start Menu help Pin
CataclysmicQuantum16-Mar-08 16:45
CataclysmicQuantum16-Mar-08 16:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.