比较编码文件时,如何忽略内置函数和类名?
当我们比较两个代码文件时,如何隐藏库函数,标识符或类似代码中的内容,而我们想忽略这些常见的事情????
.NET IDE中是否有任何内置函数可使用,对此有任何想法......
就像这里
how to hide build in library functions, identifier or such stuffs of code when we are comparing two code files and we want to ignore these things which are common ??????
is there any build in function to use in .NET IDE any idea about it...............
like here
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.Security.Cryptography;
class file1
{
public void add()
{
int a;
int b;
int c = a + b;
console.WriteLine("print the sum" + c);
}
}
还有第二个
and here second
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.Security.Cryptography;
class file2
{
public void multiply()
{
int a;
int b;
int c = a * b;
console.WriteLine("print the sum" + c);
}
}
现在,如果我想比较这两个输入编码文件,那么我想忽略它的build_in函数或关键字等,那么我们会这样做.......
我只是给出了这些文件的示例,我正在比较文件的相似性以检查它们是否被复制,现在我面临这个问题,我必须忽略所有内置函数,否则它们的相似性将给出错误的答案. ..
now if i want to compare these two input coding files so i want to ignores its build_in functions or keywords ect so would we do this .......
i just gave the example of these files i am working on comparing files for their similarities to check they are copied or not and now i faced this problem that i have to ignore such all build in functions otherwise it would give wrong answer for their similarities...
恐怕没有这样的内置函数可以实现您所期望的效果.您应该编写自己的技术来比较文件,而忽略所有您不想比较的内容.
如果您希望在不忽略任何内容的情况下进行比较,可以使用文件比较 [超越比较工具 [
I''m afraid, there is no such built-in function to achieve what you are expecting. You should write your own technique to compare the files ignoring what ever you don''t want to compare.
If you would like a compare without ignoring anything you can use the File Compare[^]
Or, in case if you would like manual compare to check the structure etc to find out if the code is copied or not, you can use Beyond Compare Tool[^]