Click here to Skip to main content
15,892,839 members
Please Sign up or sign in to vote.
1.20/5 (5 votes)
See more:
how to create a own extention in .net framework like .dll ,.exe,docx..etc .. make our own extensions ....is it possiable ???
plz help ...
Posted
Updated 5-Oct-12 6:22am
v2
Comments
fjdiewornncalwe 5-Oct-12 10:35am    
I think you need to use the Improve question widget to add more information in your question. This is incredibly vague right now and there is really no way anyone could give you a valuable answer.
Sergey Alexandrovich Kryukov 5-Oct-12 20:53pm    
The question is pretty bad, but I think I got it -- please see my answer. Hope you will find it interesting enough.
--SA
[no name] 5-Oct-12 10:40am    
Your own extension for what? File extension?
Sergey Alexandrovich Kryukov 5-Oct-12 20:53pm    
Maybe I got it. Or not -- please see my answer. Hope you will find it interesting enough.
--SA
bbirajdar 5-Oct-12 11:11am    
Create any file and save it with any extension.. You can do it using the Windows menus. No need to use .NET for it....And next time check the spelling of extension before posting....

If you mean extension methods, then yes:
C#
        string s = "Hello";
        string t = s.DoSomething();
        ...

public static class ExtensionMethods
    {
    public static string DoSomething(this string s)
        {
        return "*" + s + "*";
        }
    }
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Oct-12 20:48pm    
From the context of the question, it's pretty clear that this is not what OP had in mind.

I answered on how to write some framework which could be used as an extension of .NET -- please see.
(Not sure OP is ready for the task :-)

--SA
Do you mean writing some other framework based on .NET and adding some functionality which could be used by the applications the same was as .NET itself?

You certainly can do it. All you need to get started, in addition to good architectural and programming skills (of course), is good understanding of the Global Assembly Cache (GAC):
http://en.wikipedia.org/wiki/Global_Assembly_Cache[^].

Please see also:
http://msdn.microsoft.com/en-us/library/yf1d93sz.aspx[^],
http://msdn.microsoft.com/en-us/library/ex0ss12c.aspx[^].

This CodeProject article can also be helpful:
Demystifying the .NET Global Assembly Cache[^].

One of the major prerequisite to this is understanding of the strong-named assemblies:
http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx[^].

The notion of strong-named thing is based on the notion of strong key and and public-key cryptography. Roughly speaking, it can nearly ensure a world-unique identification of your assembly, and cryptographically strong validation of the authenticity of an assembly. Please drill in:
http://en.wikipedia.org/wiki/Strong_name[^],
http://en.wikipedia.org/wiki/Public-key_cryptography[^].

[EDIT]

Again, there is a CodeProject article which could be helpful here:
Strong Names Explained[^].

[END EDIT]

In a nutshell, you develop some .NET-based framework, generating some keys and giving strong names to all of the assemblies. Seriously develop compatibility and versioning technique for your framework (if you ever want to upgrade it). Then, develop some installation or deployment procedure (MSI, EXE,.. anything) to install this framework onto GAC. When you do it, all your framework will became universally accessible to the applications using it — the problem is solved.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900