Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I code using Windows Forms, there are lots of references like:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

But that is not all of them.
Now, my goal is to find all the references i can use in Windows Forms technology to make apps. I know i can not use all the .Net Framework.
One of the users advised to use Assembly to load "System.Windows.Forms.dll" assembly and i used it.
The result is the next code:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace _123_Assembly
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            Assembly assembly = Assembly.LoadFrom(@"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll");
            Type[] types = assembly.GetTypes();

            string data = String.Empty;

            foreach (Type type in types)
            {
                data += type.ToString() + "\r\n";
                foreach (MemberInfo member in type.GetMembers())
                {
                    data += "                " + member.ToString() + "\r\n";
                }
            }

            System.IO.StreamWriter writer = new System.IO.StreamWriter(@"C:\Users\user\Desktop\Writer.txt");
            writer.Write(data);
            writer.Close();
        }
    }
}


I wrote everything into a text file you can open online:
https://drive.google.com/file/d/0B4MmPdhmZzQAampsUGlvLXVlaVU/view?usp=sharing[^]

Is it all what i can use in my Windows Forms application from .Net Framework?
I think no, because i could not find, for example, following references and many others:
C#
using System.Drawing;
using System.Drawing.Drawing2D;


I know it is annoying you, but it is my learning curve, i always used finding what i searched for and this case is not an exception.
I read what you wrote in the last thread, you are really wise people, but it is hard sometimes to help students.
Thank you.

Quote:
You can use speech recognition is System.Windows.Forms, but do you want to include it? If you think about it, you will understand yourself that you don't asking about anything certain.

I know, i can use any .dll file made in C++ using Platform Invoke, i can use 3d party libraries.
But as i understand when i open my project, there are certain base references.
Posted
Updated 6-Jan-15 1:21am
v4

1 solution

Why not learn to use the tools that are freely available? The entire list is at: http://msdn.microsoft.com/en-us/library/gg145045(v=vs.110).aspx[^].
 
Share this answer
 
Comments
Ziya1995 6-Jan-15 7:24am    
Ok, now i wanna ask a very simple question:
Can i use anything from Framework, i mean all of the .Net Framework in my Windows Forms project?
I think no.
Richard MacCutchan 6-Jan-15 7:25am    
Yes. You need to go to each class and read the documentation.
Ziya1995 6-Jan-15 8:14am    
Yes, i went to "System.Windows.Media.Media3D Namespace".
I can not use it in my Windows Forms, there is no reference, i use .Net Framework 4.0.
There are different Class Libraries for SilverLight, WPF and so on, look:

Class Library (WPF)
http://msdn.microsoft.com/en-us/library/ms753307(v=vs.110).aspx

.NET Framework Class Library for Silverlight
http://msdn.microsoft.com/en-us/library/cc838194(v=vs.95).aspx

Are you sure i can use any of functions provided by .Net Framework Class library? Because i can use lots of them, but not all.
I need such a class library for Windows Forms where i can see only what i can use.
Richard MacCutchan 6-Jan-15 8:51am    
That class is specifically designed for use in WPF applications. Once again you are doing this the wrong way round, trying to use a class before you have any idea what it is for, or what its limitations are. You really need to do some proper studying, through tutorials and books. Asking questions like this is not the way to learn.
Ziya1995 6-Jan-15 9:12am    
I don't understand, i just wanna know names of references to add them, do you get it?
You said Windows Forms provides access to any of .Net Framework classes, but it is wrong, do you admit it?
I open a new Windows Forms project, i wanna add new references, but i don't know their names, there is that list?

You get me wrong, my question is so simple as to be stupid.

You wanna say that people don't know names of references they use and they add them by guessing?
The problem is in all of you, you are so smart that get my simple question as something serious.

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