For some reason I can't import the classes that I created. I'm not sure why. Can anybody help me out? I added a namespace, but it still isn't working. I need to add these classes to an ASP.NET website for school. However, my imports statement doesn't even show the option. What am I missing?
IDE: VS2010 Framework.net: 4.0 I created a c# dll project under Visual Studio 2010, with several public classes, and I would like to use its classes inside another dll project, but written in vb.net.
In the vb.net dll project, I referenced the built c# dll, but impossible to import the c# classes. The namespace of the c# dll is even not recognized.
What must I do to see my c# classes? If this is possible.
I'm working on a school project which need to be done in Visual Basic. For this I'm porting one of my Python project in this programming language, project which (in Python) is scanning a directory for .py files and then imports them (dynamically) with the __import__ statement, at runtime. It is possible to do this in Visual Basic with .DLL classes?
I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.
How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:
Public Class MyInterface Public Economic as EconomicClass Public Sub New() MyBase.New()
[code].....
So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:
This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.
If I have something like this within a sub/function:Dim a as new myclass...Does this leave a memory leak if I am constantly calling this function creating new instances of this class? Do I have to destroy it or something when I am done using it?
I have a Tcp Client which I created on an application form but now I would like to create a class for it.
My prob is that when I check for any incoming data, I used to start a new thread. When this new thread finds any incoming data, I call a sub which invokes the form and everything works smooth.
This is what I am talking about,[code...]
How would I be able to do the same from a class? Or I dont have to create a separate thread when using classes?
I am having trouble getting inheritance to work with the VB 2008 Express entity classes. I am a beginner with VB.Net and self-taught in VB6.0.I am able to pull data from an SQL Server data base into my application using the O/R designer. The data can be successfully queried using LINQ to SQL, either returning a single record, or multiple records or an entire table as a collection of the enty class type (so the problem is not with LINQ queries).
I am curious as to the proper technique to use SQL Server's AppRole with a LINQ to SQL Class. I understand I have to establish the intial connection with no connection pooling. However, do I simply call the SQL stored procedure sp_setapprole using standard LINQ before executing any of my methods that interact with the database, or is there a better way to enable and use AppRole within the LINQ to SQL class?
I'm running into is some of the namespaces aren't being recognized. After searching the internet it seems I am supposed to have more than just System.Management.Instrumentation available to Import/Reference.However, that is all I can access.I need System. Management. ConnectionOptions and a few others, but don't know how to get these.Do I need to install the WMI SDK, or maybe the WMI Win32 Classes?
Briefly, what I'm trying to do is add some methods and properties to the FileInfo class, which is sealed (NotInheritable). As far as I can tell, I have two options to do this.
1) Inherit from FileSystemInfo (the base class for FileInfo) and recreate the methods and properties added by FileInfo (essentially recreating the FileInfo class from scratch)
2) Use extension methods (??) which I just learned about two minutes ago and it being 1am, I'm going to get into this tomorrow
3) Create a wrapper class around a FileInfo object - I think that's the proper term
Ok, so I guess there are 3 options.
A) Why make a class uninheritable
B) Is creating a wrapper class "basically" the same as inheriting from an object, but at least with inheritence you don't need to create any properties and methods other than those you want to modify or add?
Am I correct when I say that a Field is a protected property that can only be accessed by the base class and inherited classes, or is the definition of a field something else?
This might be crazy but can I (well I know I can do this first part) and create a folder in my Solution Explorer and put classes in there, just so my main form is kept clean, as I only have a couple of forms but there is a lot of code.I thought I would call a class "Panel1_Work" and have all the panel one stuff go there, i.e I have a code which is going to sort a datagridview but i'll write my own function or sub for this as it will be getting called from a few different places.
I have the following code in a class of mine. The purpose of this class is to get the balance from a web server. Just in case something goes wrong with getting the balance. I will handle a exception. However, all this is easy to do. But I am left wondering what do I return in my catch statement.
Most of the examples I looked at just write to the console using:
Console.WriteLine(ex.Message);
That is all very well. But in a real application what do most developers do?
My function at the moment returns void. And I am just wondering what else I would return if the webclient is busy?
what I would like to do is create a class that has a few private properties and one public property.the end result of the class is to return a list(of servers)below is what I am thinking. My brain just can't come up with the correct answer.
namespace sample Private _servername As String Private _farmname As String
Using VS2008 as frontend and MS SOL Server2008 as backend... a database is created in MS SQL Server2008(SQLEXPRESS). Now the problem is i am not being able to to load the database created in MS SQL Server2008(SQLEXPRESS) onto VS.Net 2008...
I was trying to use WebRequest request = WebRequest.Create[URL]..But get an error message! I am trying to use the WebRequest .NET framework class [URL]..How can I enable .NET? Is something wrong with my installation?
the function to call the command filetype=jes. My calls to the ftp site arequote site filetye=jesasciiput filename.extquote site filetype=seqI have looked at the system.net.ftpwebrequest class and it works great for sending and files but need this one command to finish the call
When you develop a class library that will be used by others, are there any guidelines on how you decide what namespace to put it under? I often find third party classes just use the company name as the root namespace but I was also wondering if it is frowned upon (or even possible) to add one of your own classes to an existing framework namespace.
I have a List(Of SomeClass) containing a number of SomeClass items. SomeClass is just a small class with two properties, a Name string and an Int integer:
I have to get the balance from the web server. Once that is done it will call back into my main app with the result.However, sometime the web server fails for some unknown reason. Could be high volume of traffic or something else. However, I haven't implemented any exception handling in my class. As the app that uses this handles the exception. However, the client has confirmed that when the web server does fail it displays a unhandled exception dialog box. Then they have to click continue to keep using my application. So below I am not sure if I should implement the exception handling in my class.[code]
Basically we have migrated our application from VB6 to .NET and used same API calls in .NET as well.
Now the time has come to replace all API calls to .NET framework classes.
We used those API calls to validate textboxes by popping up a temporary error message box next to textbox object. After few seconds, the error message box disappears by itself or on loosing the focus of textbox.
If we can use the similar functionality of .NET, then there will be less code changes