如何在C#中引用.dll? [英] how to the refference .dll in C#?
本文介绍了如何在C#中引用.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我试图在C#中建立一个小聊天室,我跟着一个例子,我需要继承一些类,因此名称空间不想为我工作,因为我觉得我错过了一个参考。在我接下来的教程中有一个名为
Hi guys
Im trying to build a small chatroom in C#, I followed an example and I need to inherit some classes,therefore the name space doesnt want to work for me because I think Im missing a reference. in the tutorial I followed there was a file called
UChat.dll
的文件,我不知道这是什么,不知道这是否导致问题,但我很确定这个文件对于我的聊天工作
以下示例:
在ASP.NET中构建基于AJAX的聊天室 [ ^ ]
这里示例我在哪里得到错误:
, I dont know what is this and not sure if this causing the issue but im quite sure this file is important for my chat to work
The example im following :
Building an AJAX based chat room in ASP.NET[^]
Here example where im getting the error:
CS0234: The type or namespace name 'ChatEngine' does not exist in the namespace 'WebSite4'
<%@ Application Codebehind="Global.asax.cs" Inherits="WebSite4.Global" %>
Global.asax.cs
<pre lang="c#"> using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using System.ComponentModel;
using System.Web.SessionState;
namespace WebSite4
{
public partial class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public static WebSite4.**ChatEngine**.IChatEngine Engine = new WebSite4.ChatEngine.ChatEngine();
public Global()
{
InitializeComponent();
}
推荐答案
在不了解.NET基础知识的情况下,无法开发ASP.NET应用程序或其他高级应用程序类型。你真的需要学习一个最重要的部分:装配及其使用。请参阅:
http://en.wikipedia.org/wiki/.NET_assembly [ ^ ](以及本文中的所有链接),
http://msdn.microsoft.com/ en-us / library / hk5f40ct%28v = vs.90%29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/aa367757%28v=vs.85%29.aspx [<一个href =http://msdn.microsoft.com/en-us/library/aa367757%28v=vs.85%29.aspxtarget =_ blanktitle =New Window> ^ ],
http://msdn.microsoft。 com / zh-CN / library / 8wxf689z%28v = vs.110%29.aspx [ ^ ]。
-SA
You cannot develop ASP.NET application or other advanced application types without having no clue on .NET fundamentals. You really need to learn one of the most important part: assemblies and their use. Please see:
http://en.wikipedia.org/wiki/.NET_assembly[^] (and all links in this article),
http://msdn.microsoft.com/en-us/library/hk5f40ct%28v=vs.90%29.aspx[^],
http://msdn.microsoft.com/en-us/library/aa367757%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/8wxf689z%28v=vs.110%29.aspx[^].
—SA
这篇关于如何在C#中引用.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文