Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calling DLL from C# .NET 2005 - Some problems in parameters Pin
Judah Gabriel Himango31-Oct-06 17:57
sponsorJudah Gabriel Himango31-Oct-06 17:57 
QuestionRe: Calling DLL from C# .NET 2005 - Some problems in parameters Pin
datvpsc7731-Oct-06 19:25
datvpsc7731-Oct-06 19:25 
GeneralRe: Calling DLL from C# .NET 2005 - Some problems in parameters Pin
datvpsc7731-Oct-06 19:29
datvpsc7731-Oct-06 19:29 
GeneralRe: Calling DLL from C# .NET 2005 - Some problems in parameters Pin
Judah Gabriel Himango31-Oct-06 19:59
sponsorJudah Gabriel Himango31-Oct-06 19:59 
QuestionWorking around the lack of friend classes Pin
matt cole31-Oct-06 14:04
matt cole31-Oct-06 14:04 
AnswerRe: Working around the lack of friend classes Pin
Christian Graus31-Oct-06 15:51
protectorChristian Graus31-Oct-06 15:51 
GeneralRe: Working around the lack of friend classes Pin
Judah Gabriel Himango31-Oct-06 18:02
sponsorJudah Gabriel Himango31-Oct-06 18:02 
AnswerRe: Working around the lack of friend classes Pin
Leslie Sanford31-Oct-06 18:09
Leslie Sanford31-Oct-06 18:09 
matt cole wrote:
I have a situation where I have a class which I would like to be visible within its assembly, but only to be able to be created by a single other class.


Create an interface representing the functionality of the first class. Have the first class implement that functionality as a private class to the second class:

C#
public interface ISomeInterface
{
    void DoSomething();
}
 
public class MyClass
{
    private class MyPrivateClass : ISomeInterface
    {
        public void DoSomething()
        {
            // Do stuff here...
        }
    }
     
    public ISomeInterface Create();
    {
        return new MyPrivateClass();
    }
}


Maybe not exactly what you're looking for; you have the interface in your namespace which may not be implemented any where else, but that may not be a problem.
QuestionEdit DataRow in a DataSet Pin
teejayem31-Oct-06 13:27
teejayem31-Oct-06 13:27 
AnswerRe: Edit DataRow in a DataSet Pin
Tamimi - Code31-Oct-06 19:10
Tamimi - Code31-Oct-06 19:10 
QuestionHow to Encrypt Data and Save to Registry ? Pin
hdv21231-Oct-06 10:47
hdv21231-Oct-06 10:47 
AnswerRe: How to Encrypt Data and Save to Registry ? Pin
Christian Graus31-Oct-06 10:51
protectorChristian Graus31-Oct-06 10:51 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
hdv21231-Oct-06 13:21
hdv21231-Oct-06 13:21 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
Christian Graus31-Oct-06 15:52
protectorChristian Graus31-Oct-06 15:52 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
matt cole31-Oct-06 19:07
matt cole31-Oct-06 19:07 
GeneralRe: How to Encrypt Data and Save to Registry ? Pin
Haseeb Mukhtar31-Oct-06 19:54
Haseeb Mukhtar31-Oct-06 19:54 
QuestionNew buttons styles... Pin
Lucas Eduardo31-Oct-06 9:49
Lucas Eduardo31-Oct-06 9:49 
AnswerRe: New buttons styles... Pin
Dan Neely31-Oct-06 9:56
Dan Neely31-Oct-06 9:56 
GeneralRe: New buttons styles... Pin
Guffa31-Oct-06 14:05
Guffa31-Oct-06 14:05 
GeneralRe: New buttons styles... Pin
Dan Neely1-Nov-06 2:15
Dan Neely1-Nov-06 2:15 
QuestionPassing Data to a Child Form Pin
Jason887231-Oct-06 7:40
Jason887231-Oct-06 7:40 
AnswerRe: Passing Data to a Child Form Pin
Cliff Stanford31-Oct-06 11:08
Cliff Stanford31-Oct-06 11:08 
GeneralRe: Passing Data to a Child Form Pin
Jason887231-Oct-06 11:53
Jason887231-Oct-06 11:53 
GeneralRe: Passing Data to a Child Form Pin
luckykhalid31-Oct-06 19:01
luckykhalid31-Oct-06 19:01 
GeneralRe: Passing Data to a Child Form Pin
Cliff Stanford1-Nov-06 3:39
Cliff Stanford1-Nov-06 3:39 

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.