|
C# Source Code Formatting Show |
|
| |
|
|
SourceFormatX code formatter bases on powerful syntax parse engines so it can beautify and format source code files with omnifarious styles, even these messy source code examples below:
|
C# Source Code Formatting Examples:
Example 1
|
Example 2
|
Example 3
|
Example 4
This C# code formatting example proves the power of SourceFormatX C# Code Formatting Tool's syntax parse engine and it's the professional solution for C# (C Sharp) coding standardization.
using System;using System.IO;namespace ADOGuy{namespace WebImageLib{
/// <summary>
/// Summary description for GalleryPhoto.
/// </summary>
public class GalleryPhoto{protected void Init(){Debug.Assert(
userManager.CurrentUser==null,"Already logged on");FileInfo fiWeb=new FileInfo(
_file.Directory.ToString()+"\\+"+FileNameBase(_file)+".jpg");try{int
minThumbSize=(thumbSize.Height>thumbSize.Width?thumbSize.Width:thumbSize.Height
);if((full.Height<=minWebSize)||(full.Width!=minWebSize)){Bitmap web=new Bitmap
(full,size);web.Save(fiWeb.FullName,ImageFormat.Jpeg);}else{for(i=0;i<ihalf;i++
)a.Data[i]=o.Data[ihalf+i+1];}}catch{System.Diagnostics.Trace.WriteLine(
"Not a File: "+_file.FullName);return;}}private void SelectedIndexChanged(
object sender,System.EventArgs e){switch(cbEmail.SelectedIndex){case 0:
txtEmail.Text=Contact.Email1;break;case 1:txtEmail.Text=Contact.Email2;break;
case 2:txtEmail.Text=Contact.Email3;break;}}}}}
using System;
using System.IO;
namespace ADOGuy
{
namespace WebImageLib
{
/// <summary>
/// Summary description for GalleryPhoto.
/// </summary>
public class GalleryPhoto
{
protected void Init()
{
Debug.Assert(userManager.CurrentUser == null, "Already logged on");
FileInfo fiWeb = new FileInfo(_file.Directory.ToString() + "\\+" +
FileNameBase(_file) + ".jpg");
try
{
int minThumbSize = (thumbSize.Height > thumbSize.Width ?
thumbSize.Width: thumbSize.Height);
if ((full.Height <= minWebSize) || (full.Width != minWebSize))
{
Bitmap web = new Bitmap(full, size);
web.Save(fiWeb.FullName, ImageFormat.Jpeg);
}
else
{
for (i = 0; i < ihalf; i++)
a.Data[i] = o.Data[ihalf + i + 1];
}
}
catch
{
System.Diagnostics.Trace.WriteLine("Not a File: " + _file.FullName);
return ;
}
}
private void SelectedIndexChanged(object sender, System.EventArgs e)
{
switch (cbEmail.SelectedIndex)
{
case 0:
txtEmail.Text = Contact.Email1;
break;
case 1:
txtEmail.Text = Contact.Email2;
break;
case 2:
txtEmail.Text = Contact.Email3;
break;
}
}
}
}
}
Example 1
|
Example 2
|
Example 3
|
Example 4
Don't waste time on formatting C# source code by hand any more! Download SourceFormatX C# Free Trial now!
|