如何用asp.net实现校验功能!
原文:http://search.csdn.net/Expert/topic/2356/2356984.xml?temp=.249447
我这里总结了一种自认为比较不错的asp.net(C#)的数据校验方法,如大家探讨。
![](/Images/OutliningIndicators/None.gif)
主要用Regex的IsMatch方法,在BusinessRule层进行校验数据的有效性,并将校验的方法作为BusinessRule层基类的一部分。
![](/Images/OutliningIndicators/None.gif)
在WebUI层现实提示信息。
![](/Images/OutliningIndicators/None.gif)
using System;
using System.Data;
using System.Text.RegularExpressions;
namespace Education.BusinessRules
{
/// <summary>
/// 商业规则层的基类
/// </summary>
public class BizObject
{
public const String REGEXP_IS_VALID_EMAIL = @"^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$"; //电子邮件校验常量
public const String REGEXP_IS_VALID_URL = @"^http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"; //网址校验常量
public const String REGEXP_IS_VALID_ZIP = @"\d{6}"; //邮编校验常量
public const String REGEXP_IS_VALID_SSN = @"\d{18}|\d{15}"; //身份证校验常量
public const String REGEXP_IS_VALID_INT = @"^\d{1,}$"; //整数校验常量
public const String REGEXP_IS_VALID_DEMICAL = @"^-?(0|\d+)(\.\d+)?$"; //数值校验常量 "
//日期校验常量
public const String REGEXP_IS_VALID_DATE = @"^(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29))$)|(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))$";
![](/Images/OutliningIndicators/InBlock.gif)
public BizObject(){}
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验字段是否为空 或 字段长度超长 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetFieldTooLongError(string ErrorField,int maxlen)
{
return ErrorField + "信息超长,请删减至" + maxlen.ToString() + "个字符!" ;
}
![](/Images/OutliningIndicators/InBlock.gif)
public string GetFieldNullError(string ErrorField)
{
return ErrorField + "是必填项,不允许为空!" ;
}
![](/Images/OutliningIndicators/InBlock.gif)
public bool IsValidField(DataRow Row, String fieldName, int maxLen,string ErrorField ,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
if ( i < 1 && (!AllowNull))
{
Row.SetColumnError(fieldName, GetFieldNullError(ErrorField));
return false;
}
else if (i > maxLen )
{
Row.SetColumnError(fieldName, GetFieldTooLongError(ErrorField,maxLen));
return false;
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 电子邮件 类型字段格式 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetEmailFieldError(string ErrorField)
{
return ErrorField + "格式不正确(a@b.c)!" ;
}
public bool IsValidEmail(DataRow Row, String fieldName,int maxLen ,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
![](/Images/OutliningIndicators/InBlock.gif)
bool isValid = IsValidField(Row,fieldName, maxLen , ErrorField , AllowNull);
if ( isValid )
{
isValid = (new Regex(REGEXP_IS_VALID_EMAIL)).IsMatch(Row[fieldName].ToString());
if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetEmailFieldError(ErrorField));
return false;
}
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 邮编 类型字段格式 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetZipFieldError(string ErrorField)
{
return ErrorField + "格式不正确(157032)!" ;
}
public bool IsValidZip(DataRow Row, String fieldName,int maxLen ,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
![](/Images/OutliningIndicators/InBlock.gif)
bool isValid = IsValidField(Row,fieldName, maxLen , ErrorField , AllowNull);
if ( isValid )
{
isValid = (new Regex(REGEXP_IS_VALID_ZIP)).IsMatch(Row[fieldName].ToString());
if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetZipFieldError(ErrorField));
return false;
}
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 身份证 类型字段格式 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetSSNFieldError(string ErrorField)
{
return ErrorField + "格式不正确(长度为15或18位)!" ;
}
public bool IsValidSSN(DataRow Row, String fieldName,int maxLen ,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
![](/Images/OutliningIndicators/InBlock.gif)
bool isValid = IsValidField(Row,fieldName, maxLen , ErrorField , AllowNull);
if ( isValid )
{
isValid = (new Regex(REGEXP_IS_VALID_SSN)).IsMatch(Row[fieldName].ToString());
if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetSSNFieldError(ErrorField));
return false;
}
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 网址 类型字段格式 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetUrlFieldError(string ErrorField)
{
return ErrorField + "格式不正确(http://www.abc.com/)!" ;
}
public bool IsValidUrl(DataRow Row, String fieldName,int maxLen ,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
![](/Images/OutliningIndicators/InBlock.gif)
bool isValid = IsValidField(Row,fieldName, maxLen , ErrorField , AllowNull);
if ( isValid )
{
isValid = (new Regex(REGEXP_IS_VALID_URL)).IsMatch(Row[fieldName].ToString());
if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetUrlFieldError(ErrorField));
return false;
}
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 日期 类型字段格式 方法
![](/Images/OutliningIndicators/InBlock.gif)
public string GetDateFieldError(string ErrorField)
{
return ErrorField + "日期格式不正确!" ;
}
public bool IsValidDate(DataRow Row, String fieldName,int maxLen ,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
![](/Images/OutliningIndicators/InBlock.gif)
bool isValid = IsValidField(Row,fieldName, maxLen , ErrorField , AllowNull);
if ( isValid )
{
isValid = (new Regex(REGEXP_IS_VALID_DATE)).IsMatch(Row[fieldName].ToString());
if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetDateFieldError(ErrorField));
return false;
}
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
#region 校验 数值 类型字段格式 方法
//这也是个判断数值的办法
private bool IsNumeric(string Value)
{
try
{
int i = int.Parse(Value);
return true;
}
catch
{ return false; }
}
![](/Images/OutliningIndicators/InBlock.gif)
public string GetFieldNumberError(string ErrorField)
{
return ErrorField + "必须是数字(例如:90)!" ;
}
![](/Images/OutliningIndicators/InBlock.gif)
public bool IsValidNumber(DataRow Row, String fieldName,string ErrorField,bool AllowNull)
{
int i = (short)(Row[fieldName].ToString().Trim().Length);
bool isValid = (new Regex(REGEXP_IS_VALID_DEMICAL)).IsMatch(Row[fieldName].ToString());
![](/Images/OutliningIndicators/InBlock.gif)
if ( i < 1 && (!AllowNull))
{
Row.SetColumnError(fieldName, GetFieldNullError(ErrorField));
return false;
}
else if ( (!isValid) && (i > 0))
{
Row.SetColumnError(fieldName, GetFieldNumberError(ErrorField));
return false;
}
return true;
}
#endregion
![](/Images/OutliningIndicators/InBlock.gif)
}
}
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
//在继承了基类的BusinessRule中使用校验的方法
/// <summary>
/// 使用上面的方法对数据进行有效性校验
/// </summary>
/// <param name="Row">数据行</param>
/// <returns>通过--true 不通过--false</returns>
public bool Validate(DataRow Row)
{
bool isValid;
Row.ClearErrors();
isValid = IsValidField(Row, "name", 20 ,"姓名",false);
isValid &= IsValidZip(Row, "zip", 6,"邮编",true);
isValid &= IsValidNumber(Row, "age","年龄",false);
isValid &= IsValidEmail(Row,"email",50,"电子邮件" ,true);
return isValid;
}
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
//在WebUI中显示错误提示信息
/// <summary>
/// 显示提交数据返回的错误信息
/// </summary>
private void DisplayErrors()
{
String fieldErrors="";
String tmpfieldErrors="";
![](/Images/OutliningIndicators/InBlock.gif)
DataRow Row = ds.Tables[0].Rows[0];
![](/Images/OutliningIndicators/InBlock.gif)
foreach (DataColumn Column in ds.Tables[0].Columns)
{
tmpfieldErrors = Row.GetColumnError(Column.ColumnName.ToString());
if (tmpfieldErrors!="")
{
fieldErrors += "<li>" + tmpfieldErrors + "<br>";
}
}
//显示错误信息
this.lblError.Text = fieldErrors;
}
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)