SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

C# Source Code Obfuscation Show


SourceFormatX is not only the multi-language code formatter but also a code obfuscator that can obfuscate your C# (C Sharp) source code for the purposes of source code security and intellectual property protection.

C/C++ Java C# Delphi (Pascal)
PHP JSP JavaScript HTML Components
CORBA IDL


  C# Source Code Obfuscation Examples:     Example 1   |   Example 2

This is C# code obfuscating sample, the purpose of it is to show the power of SourceFormatX C# Code Formatter's syntax parse engine.

  /* Before C Sharp Code Obfuscating */

  namespace Monotalk.Indexer
  {
    using System;
    using System.IO;
    using System.Collections;

    using Monotalk;
    using Monotalk.CSharp;

    public class Indexer
    {
      public SourceDB db = new SourceDB();
      Hashtable fileIDs = new Hashtable();
      Hashtable fileNames = new Hashtable();
      int files = 0;

      public string this[int ID]
      {
        get{return (string)fileNames[ID];}
      }

      public void Parse(string filename)
      {
        CSharpParser parser;
        ArrayList defines = new ArrayList();
        Stream input;
        int id;

        if (fileIDs[filename] == null)
        {
          fileIDs[filename] = (object)files;
          id = (int)fileIDs[filename];
          fileNames[id] = filename;
          files++;
        }
        else
          id = (int)fileIDs[filename];

        try
        {
          input = File.OpenRead(filename);
        }
        catch
        {
          Console.WriteLine("Source file '" + filename + "' could not be opened");
          return ;
        }

        StreamReader reader = new StreamReader(input);

        parser = new CSharpParser(reader, filename, defines, db, id);

        try
        {
          parser.parse();
        }
        catch (Exception ex)
        {
          Console.WriteLine("Compilation aborted: " + ex);
        }
        finally
        {
          input.Close();
        }
      }
    }
  }


  /* After C Sharp Code Obfuscating */

  namespace Monotalk.Indexer{using System;using System.IO;using
  System.Collections;using Monotalk;using Monotalk.CSharp;public class Indexer{
  public SourceDB db=new SourceDB();Hashtable fileIDs=new Hashtable();Hashtable
  fileNames=new Hashtable();int files=0;public string this[int ID]{get{return(
  string)fileNames[ID];}}public void Parse(string filename){CSharpParser parser;
  ArrayList defines=new ArrayList();Stream input;int id;if(fileIDs[filename]==
  null){fileIDs[filename]=(object)files;id=(int)fileIDs[filename];fileNames[id]=
  filename;files++;}else id=(int)fileIDs[filename];try{input=File.OpenRead(
  filename);}catch{Console.WriteLine("Source file '"+filename+
  "' could not be opened");return;}StreamReader reader=new StreamReader(input);
  parser=new CSharpParser(reader,filename,defines,db,id);try{parser.parse();}
  catch(Exception ex){Console.WriteLine("Compilation aborted: "+ex);}finally{
  input.Close();}}}}

Example 1   |   Example 2

  Download SourceFormatX C# Code Formatter to format and obfuscate all your C Sharp source code files today!