如何将最初使用 using
指令编写的文件转换为完全限定名称?
例如从
using System;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Text;
using System.Xml.XPath;
namespace ChatterBotAPI
{
public interface ChatterBotSession
{
ChatterBotThought Think(ChatterBotThought thought);
string Think(string text);
}
internal class PandorabotsSession : ChatterBotSession
{
private readonly IDictionary<string, string> vars;
public PandorabotsSession(string botid)
{
vars = new Dictionary<string, string>();
vars["botid"] = botid;
vars["custid"] = Guid.NewGuid().ToString();
}
public ChatterBotThought Think(ChatterBotThought thought)
{
...
}
到此
namespace ChatterBotAPI
{
public interface ChatterBotSession
{
ChatterBotThought Think(ChatterBotThought thought);
string Think(string text);
}
internal class PandorabotsSession : ChatterBotSession
{
private readonly System.Collections.Generic.IDictionary<string, string> vars;
public PandorabotsSession(string botid)
{
vars = new System.Collections.Generic.Dictionary<string, string>();
vars["botid"] = botid;
vars["custid"] = System.Guid.NewGuid().ToString();
}
public ChatterBotThought Think(ChatterBotThought thought)
{
...
}
最佳答案
转到 Resharper 选项卡 => 选项...
转到代码编辑部分 => C# => 代码样式
勾选“首选完全合格的引用文献”。 (并保存更改)
右键单击您的项目并选择清理代码。 (或按 Ctrl E + Ctrl C)
选择“完全清理”即可开始(如果您不想完全清理,则可以创建自己的配置文件,并仅选择要应用的编码风格。)
关于c# - 使用 using 语句将代码转换为完全限定名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41254091/