我们可以使用C#比较两个JavaScript文件吗? [英] Can we compare two javascript files using C#?

查看:84
本文介绍了我们可以使用C#比较两个JavaScript文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
谁能告诉我如何使用C#比较两个JavaScript文件?
我曾尝试比较两个文本文件,但是如果第一个文件和第二个文件具有相同的数据,则第二个文件中仅留有一个空格.然后显示一个更改.

Hi everyone,
Can anyone tell me how to compare two javascript files using C#?
I have tried comparing the two text files,But if the first file and second file has same data only a space is extra in Second file.then it showing me a Change.

推荐答案

因此,将两个文件读入单独的字符串,删除所有空格,制表符和任何其他不可打印的ascii字符,然后比较字符串.
So read both files into separate strings, remove all of the spaces, tabs, and any other unprintable ascii character, and THEN compare the strings.


这篇关于我们可以使用C#比较两个JavaScript文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆