'.NET'에 해당되는 글 40건
- 2011/11/04 volatile(C# 참조)
- 2011/09/08 Win32 to .NET Framework API MAP
- 2010/11/26 All-in-one code Framework
- 2010/11/01 Last.fm API and Facebook API for .NET
- 2010/05/06 .NET 개발자들이 동감하는 애니메이션 -_ -;; (6)
- 2009/10/11 ASP.NET 2.0 AJAX - UpdateProgress
- 2009/05/14 C# : Unit Class - File Size
- 2009/04/20 C# : TextBox Auto Scrolling (2)
- 2009/04/14 Better string.IsNullOrEmpty() ? How to do C#.NET 3.0
- 2009/04/10 C# - Length unit class , 길이 관련 클래스
SingleTone Pattern을 적용하기 위해 volatile이란 키워드가 있는걸 알게 되었습니다.
목적에 맞는 코딩이 중요하니깐 꼭 알아둬야겠네요..
volatile(C# 참조)
일반적으로 volatile 한정자는 액세스를 serialize할 때 lock 문(C# 참조) 문을 사용하지 않고 여러 스레드에서 액세스하는 필드에 사용됩니다. 다중 스레드 시나리오에서 volatile을 사용하는 방법의 예제는 방법: 스레드 만들기 및 종료(C# 프로그래밍 가이드)를 참조하십시오.
volatile 키워드는 다음과 같은 형식의 필드에 적용할 수 있습니다.
-
참조 형식
-
안전하지 않은 컨텍스트의 포인터 형식 포인터 자체는 volatile일 수 있는 반면 포인터가 가리키는 개체는 volatile일 수 없습니다. 즉, "volatile 개체에 대한 포인터"를 선언할 수 없습니다.
-
sbyte, byte, short, ushort, int, uint, char, float 및 bool 같은 정수 계열 형식
-
정수 계열 형식을 기반으로 한 열거형
-
참조 형식으로 알려진 제네릭 형식 매개 변수
volatile 키워드는 클래스 또는 구조체의 필드에만 적용할 수 있습니다. 로컬 변수는 volatile로 선언할 수 없습니다.
'.NET > C#' 카테고리의 다른 글
| volatile(C# 참조) (0) | 2011/11/04 |
|---|---|
| Win32 to .NET Framework API MAP (0) | 2011/09/08 |
| Visual Studio - Windows Service Build Event (0) | 2011/08/17 |
| Hooking on C# (0) | 2011/07/07 |
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
Win32 to .NET Framework API MAP
http://msdn.microsoft.com/ko-kr/library/aa302340(en-us).aspx
자주 사용하지는 않지만 필요할때는 꼭 기억이 안나는군요 =ㅅ =;;
참고하세요.
'.NET > C#' 카테고리의 다른 글
| volatile(C# 참조) (0) | 2011/11/04 |
|---|---|
| Win32 to .NET Framework API MAP (0) | 2011/09/08 |
| Visual Studio - Windows Service Build Event (0) | 2011/08/17 |
| Hooking on C# (0) | 2011/07/07 |
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
http://1code.codeplex.com/
Microsoft 기반의 개발 기술의 다양한 언어에 대해 단일의 프레임워크 환경을 제공합니다.
흠..
한가지 언어가 아닌 여러가지 언어가 사용될 수 있는 프로젝트에서 유용하게 사용될 것 같네요~
참고로 알아둬야겠습니다.
혹시 모를 나중을 위해 ㅎㅎ
'.NET' 카테고리의 다른 글
| All-in-one code Framework (0) | 2010/11/26 |
|---|---|
| IE Plugin Development (0) | 2010/11/01 |
| iTunes Programming - SelectedTracks (0) | 2009/03/24 |
| DevPia 에서 스크랩한 링크들 (0) | 2009/02/12 |
| 고품질 코드 작성 (0) | 2008/04/18 |
| MS Heros Happen here 세미나 자료 (0) | 2008/04/10 |
Facebook : http://facebooktoolkit.codeplex.com/
Facebook(C#) : http://github.com/facebook/csharp-sdk
Facebook(MSDN) : http://msdn.microsoft.com/en-us/windows/ee388574.aspx
알아뒀다가 써먹어야지 ㅇㅅㅇ
'.NET > C#' 카테고리의 다른 글
| Q&A - Send a None exist email with SmtpClient(C#) (0) | 2011/03/27 |
|---|---|
| C# 'this' keyword - Extension Method (0) | 2011/02/25 |
| Last.fm API and Facebook API for .NET (0) | 2010/11/01 |
| Windows Service Debugging (0) | 2009/10/21 |
| Unicode 한글 코드 표 (0) | 2009/09/27 |
| C# : Unit Class - File Size (0) | 2009/05/14 |
– 이곳에 (http://www.mari.kr/tag/UpdateProgress) UpdatePanel과 같이 사용하는 UpdateProgress 컨트롤에 대한 설명이 정말 잘 되 있더군요.
아래 코드는 위 사이트에서 가져온 내용인데
정말 잘 분석해두셨네요 ㅎㅎ
나중에도 잘 쓸 코드 같습니다.
<asp:UpdateProgress ID="listViewUpdateProgress" AssociatedUpdatePanelID="listViewUpdatePanel" runat="server" DisplayAfter="50">
<ProgressTemplate>
<style type="text/css">
#UpdateProgressTable {
position:absolute;
z-index:100;
top:0px;
margin:0px;
left:0px;
background-color:#FAFAFA;
border-width:0px;
border-style:None;
font-family:"돋움";
filter:progid:DXImageTransform.Microsoft.Shadow(color=#ffffff, Direction=0, Strength=0)alpha(Opacity=60);
}
</style>
<script type="text/javascript">
function UpdateProgressInit() {
var progress = $get("UpdateProgressTable");
if (typeof (progress) == "object") {
progress.style.width = getClientBounds().width;
progress.style.height = getClientBounds().height;
}
}
function CancelAsyncPostBack() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm.get_isInAsyncPostBack()) {
prm.abortPostBack();
}
}
function getClientBounds() {
var clientHeight;
switch (Sys.Browser.agent) {
case Sys.Browser.InternetExplorer:
clientWidth = document.documentElement.clientWidth;
clientHeight = document.documentElement.clientHeight;
break;
case Sys.Browser.Safari:
clientWidth = window.innerWidth;
clientHeight = window.innerHeight;
break;
case Sys.Browser.Opera:
clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
break;
default: // Sys.Browser.Firefox, etc.
clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
break;
}
returnnewSys.UI.Bounds(0, 0, clientWidth, clientHeight);
}
</script>
<table align="left" id="UpdateProgressTable">
<tr>
<td align="center">
<br/>페이지 변경 중 입니다...
<br/>
<input id="Button2" type="button" value="취소" onclick="CancelAsyncPostBack()" />
</td>
</tr>
</table>
</ProgressTemplate>
</asp:UpdateProgress>
'.NET > ASP.NET' 카테고리의 다른 글
| web.config 암호화 - Encrypt Configuration Sections in ASP.NET 2.0 Using RSA (0) | 2010/04/12 |
|---|---|
| ASP.NET Layout 각 폴더 별 설명 (0) | 2010/04/05 |
| ASP.NET 2.0 AJAX - UpdateProgress (0) | 2009/10/11 |
| A .NET library for OpenFlashChart control (0) | 2009/03/29 |
| iTunes Data Grid Skin for ASP.NET GridView, ListView Control (0) | 2009/02/02 |
| Apache Mod_Rewrite use as URL_Rewrite in iis 7 (0) | 2009/01/21 |
Trackback : http://i-ruru.com/trackback/511
-
Subject JIXmall :: ajax
2009/11/24 09:20
JIXmall :: ajax에 대한 정보입니다.
이전에 올렸던 Length 단위에 이어 두번째 File Size 관련된 단위입니다.
귀찮았는데 막상 파일사이즈를 보여야 할 일이 있어서
간단히 Property 를 이용해서 작성해 봤네요.
C# 프로퍼티(Property)의 가장 적절한 예가 아닌가 생각됩니다. ㅋㅋㅋ
class FileSize
{
public enum UNITS { B, KB, MB, GB, TB }
double b = 0;
double kb = 0;
double mb = 0;
double gb = 0;
double tb = 0;
public double B
{
get
{
return this.b;
}
set
{
this.b = value;
this.kb = this.b / 1024;
this.mb = this.kb / 1024;
this.gb = this.mb / 1024;
this.tb = this.gb / 1024;
}
}
public double KB
{
get
{
return this.kb;
}
set
{
this.kb = value;
this.B = this.kb * 1024;
}
}
public double MB
{
get
{
return this.mb;
}
set
{
this.mb = value;
this.KB = this.mb * 1024;
}
}
public double GB
{
get
{
return this.gb;
}
set
{
this.gb = value;
this.MB = this.gb * 1024;
}
}
public double TB
{
get
{
return this.tb;
}
set
{
this.tb = value;
this.GB = this.tb * 1024;
}
}
public FileSize(double size)
{
this.B = size;
}
public override string ToString()
{
string ret = string.Empty;
if (b < 1024D)
{
ret = string.Format("{0}{1}", b, UNITS.B.ToString());
}
else if (kb < 1024D)
{
ret = string.Format("{0}{1}", kb, UNITS.KB.ToString());
}
else if (mb < 1024D)
{
ret = string.Format("{0}{1}", mb, UNITS.MB.ToString());
}
else if (gb < 1024D)
{
ret = string.Format("{0}{1}", gb, UNITS.GB.ToString());
}
else
{
ret = string.Format("{0}{1}", tb, UNITS.TB.ToString());
}
return ret;
}
}
'.NET > C#' 카테고리의 다른 글
| Windows Service Debugging (0) | 2009/10/21 |
|---|---|
| Unicode 한글 코드 표 (0) | 2009/09/27 |
| C# : Unit Class - File Size (0) | 2009/05/14 |
| Memory usage of current thread on C# windows form app. (0) | 2009/04/23 |
| C# : TextBox Auto Scrolling (2) | 2009/04/20 |
| Better string.IsNullOrEmpty() ? How to do C#.NET 3.0 (0) | 2009/04/14 |
1. 다음과 같이 TextBox에 값을 설정 후
textBox.Text = "some string";
스크롤이 생길 정도의 문자열을 넣어도 스크롤은 위에 고정되어 있습니다.
계속 바닥으로 스크롤이 되어있기 원한다면
textBox.Select(textBox.Text.Length, 0);
textBox.ScrollToCaret();
위와 같은 코드를 값을 입력 후 실행해 줍니다.
2. 문자열 값을 추가하고 항상 scroll을 바닥으로 하고 싶다면.
textBox.Text += "some string";
위와 같은 코드는 피해야 합니다.
textBox.AppendText("some string");
대신 AppendText(string) 메소드를 사용하면 값을 입력한 후 스크롤이 바닥으로 이동합니다.
'.NET > C#' 카테고리의 다른 글
| C# : Unit Class - File Size (0) | 2009/05/14 |
|---|---|
| Memory usage of current thread on C# windows form app. (0) | 2009/04/23 |
| C# : TextBox Auto Scrolling (2) | 2009/04/20 |
| Better string.IsNullOrEmpty() ? How to do C#.NET 3.0 (0) | 2009/04/14 |
| C# - Length unit class , 길이 관련 클래스 (0) | 2009/04/10 |
| Error Handling Guide - Rethrow to preserve stack details (0) | 2009/04/03 |
String.IsNullOrEmpty() 더 잘 활용해보자
http://blog.yesnobox.com/post/Better-stringIsNullOrEmpty().aspx
우리가 자주 사용하는 string.IsNullOrEmpty()
다들 이 메소드를 사용하면서 익숙해졌겠지만.
아마도 한번쯤 이런생각을 했을지 모른다.
str.ToString() 처럼 object내의 메소드로 만들지 않고 왜 Class의 static 메소드로 만들었을까?
str.IsNullOrEmpty()로 사용하면 편할텐데.. ?
위 주소에 위와 같은 생각을 해결해 줄 수 있다.
'.NET > C#' 카테고리의 다른 글
| Memory usage of current thread on C# windows form app. (0) | 2009/04/23 |
|---|---|
| C# : TextBox Auto Scrolling (2) | 2009/04/20 |
| Better string.IsNullOrEmpty() ? How to do C#.NET 3.0 (0) | 2009/04/14 |
| C# - Length unit class , 길이 관련 클래스 (0) | 2009/04/10 |
| Error Handling Guide - Rethrow to preserve stack details (0) | 2009/04/03 |
| 훈스 C# 스터디 5주차 - CLR의 동작 , 메모리 관리, Boxing, UnBoxing, Generic (0) | 2009/03/11 |
CodeProject에 올라온 코드를 보던 중 유용한 클래스를 발견했다.
딱 보아도 한눈에 알 수 있는 길이 관련된 클래스
원본 길이 단위의 값을 넣고, 원하는 길위 단위로 값을 읽어오기만하면, 길이를 원하는 형식으로 변경할 수 있다.
꽤 유용하게 써먹을 듯?? 훗~
public class Length
{
public enum UNITS{FEET=0,KM,METER,MILES}
private double meter = 0;
private double km = 0;
private double ft = 0;
private double miles = 0;
public double Meter
{
get
{
return this.meter;
}
set
{
this.meter=value;
this.km=this.meter/1000;
this.ft=this.meter*3.2808;
this.miles=this.meter*6.2e-4;
}
}
public double Km
{
get
{
return this.km;
}
set
{
this.km=value;
this.Meter=this.km*1000;
}
}
public double Ft
{
get
{
return this.ft;
}
set
{
this.ft=value;
this.Meter=this.ft/3.2808;
}
}
public double Miles
{
get
{
return this.miles;
}
set
{
this.miles=value;
this.meter=this.miles/6.2e-4;
}
}
}
'.NET > C#' 카테고리의 다른 글
| C# : TextBox Auto Scrolling (2) | 2009/04/20 |
|---|---|
| Better string.IsNullOrEmpty() ? How to do C#.NET 3.0 (0) | 2009/04/14 |
| C# - Length unit class , 길이 관련 클래스 (0) | 2009/04/10 |
| Error Handling Guide - Rethrow to preserve stack details (0) | 2009/04/03 |
| 훈스 C# 스터디 5주차 - CLR의 동작 , 메모리 관리, Boxing, UnBoxing, Generic (0) | 2009/03/11 |
| Different with ArrayList, List<T> – Boxing, None Boxing (0) | 2009/03/10 |





Prev




