Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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:26am
Edited 5-Oct-12 6:22am
v2
Comments
Marcus Kramer at 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 at 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
Wes Aday at 5-Oct-12 10:40am
   
Your own extension for what? File extension?
Sergey Alexandrovich Kryukov at 5-Oct-12 20:53pm
   
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 at 5-Oct-12 12:44pm
   
With the update, yes it's possible. You can name a file with any extension you want.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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  
v2

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



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 5 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid