Click here to Skip to main content
Sign Up to vote bad
good
See more: C#4.0.NET4
how to create a own extention in .net framework like .dll ,.exe,docx..etc .. make our own extensions ....is it possiable ???
plz help ...
Posted 5 Oct '12 - 4:26
Edited 5 Oct '12 - 6:22

Comments
Marcus Kramer - 5 Oct '12 - 10:35
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:53
The question is pretty bad, but I think I got it -- please see my answer. Hope you will find it interesting enough. --SA
Wes Aday - 5 Oct '12 - 10:40
Your own extension for what? File extension?
Sergey Alexandrovich Kryukov - 5 Oct '12 - 20:53
Maybe I got it. Or not -- please see my answer. Hope you will find it interesting enough. --SA
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....
Wes Aday - 5 Oct '12 - 12:44
With the update, yes it's possible. You can name a file with any extension you want.

2 solutions

If you mean extension methods, then yes:
        string s = "Hello";
        string t = s.DoSomething();
        ...
 
public static class ExtensionMethods
    {
    public static string DoSomething(this string s)
        {
        return "*" + s + "*";
        }
    }
  Permalink  
Comments
Sergey Alexandrovich Kryukov - 5 Oct '12 - 20:48
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
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 464
1 Mahesh Bailwal 373
2 Maciej Los 255
3 Rohan Leuva 175
4 CPallini 175
0 Sergey Alexandrovich Kryukov 9,402
1 OriginalGriff 7,204
2 CPallini 3,933
3 Rohan Leuva 3,211
4 Maciej Los 2,743


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid