|
KB Article |
|
|
Wes Peterson
|
1. [DllImport] attribute
This code allows you to use Win32 DLLs in your .NET applications.
|
 Code
 12264 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
2. A 10 Minute C# Console Application Quick Start
This will show how to make a "hello world" console application in Visual Studio 2008 with C#. Let VS.Net do the work and create a new console application using the menu. Use Console.WriteLine and Console.ReadLine for simple input and output.
13 years ago, and updated 13 years ago
(3 Comments
, last by angie.f )
|
 Article
 15535 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
3. A 10 Minute C# Winforms Quick Start
The ButtonsCS project. Create a classic "Hello, World" application using Visual Studio .Net with C# syntax. Requires either the full version or Visual C# Express Edition.
|
 Article
 18398 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
4. An Inventory Transaction Report in C#
This article describes a C# module I created that will generate an inventory transaction report.
71 days ago, and updated 51 days ago
(2 Comments
, last by amelia.f )
|
 Article
 75 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
5. Applying the Built-in ASP.NET User-Login Functionality to Your Database
Using aspnet_regsql.exe to set up a database to support the functionality of ASP.NET 2.0's built-in membership.
13 years ago, and updated 13 years ago
(4 Comments
, last by James.W5 )
|
 KB Post
 6642 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
6. ASP.NET Extension Information
This article describes the ASPX file extensions.
19 years ago, and updated 13 years ago
(3 Comments
, last by Interior.t )
|
 KB Post
 9592 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
7. Associative Arrays in C# (a Dictionary)
A Dictionary is a data type which maps a key to a value. The key and the value can be any type, the Dictionary shows the link between the two.
This example shows the relationship between the 3-letter airport code and their location. The code will produce a message box which says "Los Angeles."
(4 Comments
, last by Daniyal.A )
|
 Code
 14354 Hits
|
 C# (Visual C# & VS.Net)
|
Wes Peterson
|
8. Attribute
An attribute is a "shorthand" mechansim for having additional metadata included in your assembly.
14 years ago, and updated 13 years ago
|
 Definition
 11034 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
9. Boxing and Unboxing
Boxing is the conversion of a value type to the object type (or to any interface type that is implemented by the value type). Unboxing is the conversion from an object type to a value type (or from an interface type to any value type that is implemented by the value type).
13 years ago, and updated 12 years ago
|
 KB Post
 8603 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
10. C Sharp Code for Making a Double Entry General Ledger Posting (Method 1)
This article discuss a C# programming technique I used to create a color coded method for performing double entry postings to my Chart of Accounts software.
72 days ago, and updated 51 days ago
|
 Article
 53 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
11. C Sharp Code for Making a Double Entry General Ledger Posting (Method 2)
This article discuss a C# programming technique I used to create a method for performing double entry postings to my Chart of Accounts software that is modularized by type of transaction. The customer I designed this for advocated this idea, because it was similar to what he was already doing with pen and paper.
71 days ago, and updated 51 days ago
|
 Article
 46 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
12. C# Abstraction (abstract, override)
C# supports abstract class members and abstract classes using the abstract modifier. An abstract class is a class with one or more abstract members and you cannot instantiate an abstract class. However, you can have additional implemented methods and properties. An abstract member is either a method (implicitly virtual), property, indexer, or event in an abstract class. You can add abstract members ONLY to abstract classes using the abstract keyword.
13 years ago, and updated 12 years ago
(3 Comments
, last by eion.r )
|
 Code |
 Article |
34411 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
13. C# Access Modifiers
In C#, you specify each class and each class member's visibility with an access modifier. The C# access modifiers are the traditional public, protected, and private plus the two additional .Net modifiers internal and protected internal.
Internal indicates members are accessible from types in the same assembly. Protected internal indicates members are accessible from types in the same assembly as well as descendant classes. OO purist might object to internal and protected internal and I suggest you choose private, protected, or public over them until you both fully understand them and have a need that is best suited by them.
The default for class and class members is Internal (members are accessible from types in the same assembly). This is different than with interfaces where the default for an interface is Internal but an interface's members are always public -- which makes sense but is noteworthy.
With both classes and interfaces, if you make a class public, the members are public. This applies to the other access modifiers too. For example, if you make a class protected, the members default access modifiers are protected.
13 years ago, and updated 12 years ago
|
 Code
10315 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
14. C# Assignment (=)
Languages Focus: AssignmentCommon assignment operators for languages include =, ==, and :=. An assignment operator allows you to assign a value to a variable. The value can be a literal value like "Mike" or 42 or the value stored in another variable or returned by a function. C# AssignmentC# uses = for it's assignment operator.
13 years ago, and updated 13 years ago
(1 Comments
, last by quick.e )
|
 Code
 6820 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
15. C# Associative Array (Dictionary)
A set of unique keys linked to a set of values. Each unique key is associated with a value. Think of it as a two column table.
MyArray['CA'] = 'California'
MyArray['AR'] = 'Arizona' Languages Focus: Associative ArrayAssociative arrays are also known as a dictionary or a hash table in other languages. C# Associative Array
13 years ago, and updated 12 years ago
(4 Comments
, last by David.T8 )
|
 Code
 25451 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
16. C# Base Class (System.Object)
In C#, the Object keyword is an alias for the base System.Object class and is the single base class all classes ultimately inherit from.
13 years ago, and updated 12 years ago
|
 Code
8691 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
17. C# Case Sensitivity (Yes)
C# is case sensitive. The following does NOT: messagebox.Show("hello"); //Does not work!
The first time you type any other case for commands or variables, VS.Net will change it to the accepted or defined case. For example, if you type messagebox.show it is converted to MessageBox.Show. Once corrected, you can break it again by editing MessageBox to messagebox and the compiler will give you an error.
13 years ago, and updated 12 years ago
|
 Code |
 KB Post |
10842 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
18. C# Class..Object (class...new)
In C#, you use the class keyword to specify a class and you signify its parent with a colon and the name of the parent class. When you instantiate an object from a class, you use the new keyword.
13 years ago, and updated 12 years ago
|
 Code |
 KB Post |
13196 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
19. C# Code Blocks ({ })
For C#, I prefer to put the opening { and the closing } on their own line (as opposed to C++, Java, and JavaScript where I put the opening bracket at the end of the first line.
13 years ago, and updated 12 years ago
|
 Code
 7527 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
20. C# Comparison Operators (==, !=)
When comparing floating point numbers, make sure you round to an acceptable level of rounding for the type of application you are using. Languages Focus: Comparison OperatorsA comparison operator compares two values either literals as in "Hello" and 3 or variables as in X and Counter. Most languages use the same operators for comparing both numbers and strings. Perl, for example, uses separate sets of comparison operators for numbers and strings. C# Comparison OperatorsCommon comparison operators:
== |
equal |
!= |
not equal |
< |
less than |
> |
greater than |
<= |
less than or equal |
>= |
greater than or equal |
13 years ago, and updated 12 years ago
|
 Code
 10061 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
21. C# Constants (const)
In C#, you define constants with the const keyword.
All constants are part of a class (no global constants) but you can make a constant public and have access to it so long as you have added the class to the project (even without creating the class as if they were static, but you cannot use the static keyword).
Constants must be of an integral type (sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, bool, or string), an enumeration, or a reference to null.
12 years ago, and updated 12 years ago
|
 Code
11045 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
22. C# Constructors (Use class name)
In C#, a constructor is called whenever a class or struct is created. A constructor is a method with the same name as the class with no return value and you can overload the constructor. If you do not create a constructor, C# will create an implicit constructor that initializes all member fields to their default values.
Constructors can execute at two different times. Static constructors are executed by the CLR before any objects are instantiated. Regular constructors are executed when you create an object.
12 years ago, and updated 12 years ago
|
 Code |
 Article |
17415 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
23. C# Custom Routines
ReturnType RoutineName()
Note: C# requires () in both the function declaration, and when it's invoked.
13 years ago, and updated 13 years ago
|
 Code
 8574 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
24. C# Deployment Overview
C# projects require the .Net framework and any additional dependencies you've added such as Crystal Reports.
In Visual Studio.Net, you can create a Setup and Deployment project by using any of the templates available on the New Project dialog (Other Project Types).
In addition, C# projects also support ClickOnce which brings the ease of Web deployment to Windows Forms and console applications. To get started, right click on your solution in the Solution Explorer, click Properties then select the Security tab.
In addition, you can use any of the many free and commercially available installation packages.
|
 Code
 7964 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
25. C# Development Tools
Languages Focus: Development ToolsPrimary development tool(s) used to develop and debug code.
C# Development ToolsMicrosoft Visual C# and the full version of Microsoft Visual Studio.Net are the current primary tools. CodeGear does have C#Builder but it's not a primary tool currently and development on the tool has slowed in recent years.
13 years ago, and updated 12 years ago
|
 Code
 7020 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
26. C# Empty String Check (String.IsNullOrEmpty)
The .Net framework offers a static method in the string class: String.IsNullOrEmpty.
|
 Code
 10425 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
27. C# End of Statement (;)
C# uses a semicolon ";" as an end of statement specifier and you can put multiple statements on a single line of code if you wish as well as split a single statement into two or more code lines.
13 years ago, and updated 12 years ago
|
 Code
8169 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
28. C# Exception Trapping (try...catch...finally)
C# uses a try...catch...finally statement to trap for errors. try {} catch {} finally {}
13 years ago, and updated 12 years ago
(1 Comments
, last by Paul.L4 )
|
 Code
 9178 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
29. C# File Extensions
Common source code file extensions include:
- .SLN - Solution File. Contains solution specific information such as links to the projects within this solution.
- .CSPROJ - C# Project File. Contains project specific information.
- .CS - C# source file.
- .Designer.CS - C# form file (a text resource file).
13 years ago, and updated 12 years ago
|
 Code
 7740 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
30. C# Finalizer (~ClassName)
Use a destructor to free unmanaged resources. A destructor is a method with the same name as the class but preceded with a tilde (as in ~ClassName). The destructor implicity creates an Object.Finalize method (you cannot directly call nor override the Object.Finalize method).
In C# you cannot explicitly destroy an object. Instead, the .Net Frameworks garbage collector (GC) takes care of destroying all objects. The GC destroys the objects only when necessary. Some situations of necessity are when memory is exhausted or you explicitly call the System.GC.Collect method. In general, you never need to call System.GC.Collect.
|
 Code |
 Article |
16409 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
31. C# If Statement (if..else if..else)
Use () around evaluation with no "then".
13 years ago, and updated 12 years ago
|
 Code
 6893 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
32. C# Inheritance (: ParentClass)
Simple syntax example of class inheritance.
13 years ago, and updated 12 years ago
|
 Code
 9555 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
33. C# Inheritance-Multiple (Not Supported)
C# does not support multiple implementation inheritance. Each class can have only one parent class (a single inheritance path). In C#, you can use multiple interface usage to design in a multiple class way horizontally in a class hierarchy.
13 years ago, and updated 12 years ago
|
 Code
 6201 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
34. C# Inlining (Automatic)
In C#, inlining is automatically done for you by the JIT compiler for all languages and in general leads to faster code for all programmers whether they are aware of inlining or not.
(7 Comments
, last by Megha.M )
|
 Code
 8972 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
35. C# Interfaces (interface)
Classes and structs can inherit from interfaces in a manner similar to how classes can inherit a base class or struct, but a class or struct can inherit more than one interface and it inherits only the method names and signatures, because the interface itself contains no implementations.
class MyClass: IMyInterface { public object Clone() { return null; } // IMyInterface implemented here... }
13 years ago, and updated 12 years ago
|
 Code |
 Article |
 15815 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
36. C# Literals (quote)
Literals are quoted as in "Prestwood". If you need to embed a quote use a slash in front of the quote as in \".
13 years ago, and updated 12 years ago
|
 Code
 8631 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
37. C# Logical Operators
Same as C++ and Java. C# logical operators:
& |
and, as in this and that |
No Short Circuit |
&& |
and, as in this and that |
short circuits |
| |
or, as in this or that |
No Short Circuit |
|| |
or, as in this or that |
short circuits |
! |
Not, as in Not This |
|
^ |
either or, as in this or that but not both |
|
|
 Code
 9953 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
38. C# Member Field
In C# you can set the visibility of a member field to any visibility: private, protected, public, internal or protected internal.
You can intialize a member field with a default when declared. If you set the member field value in your constructor, it will override the default value.
Finally, you can use the static modifier (no instance required) and readonly modifier (similar to a constant).
12 years ago, and updated 12 years ago
|
 Code
9044 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
39. C# Member Method
In C# you can set the visibility of a member field to any visibility: private, protected, public, internal or protected internal. You can intialize a member field with a default when declared. If you set the member field value in your constructor, it will override the default value. Finally, you can use the static modifier (no instance required) and readonly modifier (similar to a constant).
13 years ago, and updated 12 years ago
(2 Comments
, last by Lorivers.H )
|
 Code |
 Article |
 13948 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
40. C# Member Modifiers
The method modifiers are abstract, extern, new, partial, sealed, virtual, and override. Specify C# member modifiers as follows:
abstract SomeMethod() {..}
The field modifiers are const, readonly, static, volatile. Specify field modifiers as follows:
readonly int MyAge;
|
 Code
 8158 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
41. C# Member Property (no (), get, set)
In C#, parens indicate a method and the lack of parens indicate a property. You use special get and set methods to both get and set the values of properties. For a read-only property, leave out the set method. The value keyword is used to refer to the member field. Properties can make use of any of the access modifiers (private, protected, etc). It is common to use a lowercase member names for member fields ("name" in our example) and uppercase properties to manage member fields ("Name" in our example).
13 years ago, and updated 12 years ago
|
 Code |
 Article |
16885 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
42. C# Multiple Line Comment (// or /* */)
Commenting Code C# uses "//" for a single line comment and /* */ for a multiple line comment.
13 years ago, and updated 12 years ago
(6 Comments
, last by Carver.L3 )
|
 Code
 9364 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
43. C# Null-Coalescing Operator: ??
The null-coalescing operatior ?? is used to assign a default value for nullable value types or reference types. This operator prevents exceptions from being thrown when trying to assign a nullable type to a non-nullable type.
For example, this code will throw an exception.
int? x = null; int y = x;
However, this code will assign the default value of -1 to y: int? x = null; int y = x ?? -1;
13 years ago, and updated 12 years ago
(1 Comments
, last by Paul.L4 )
|
 Definition
 8998 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
44. C# Overloading (implicit)
C# Overloading
- Operator - Yes.
- Method - Yes.
13 years ago, and updated 12 years ago
|
 Code
 11982 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
45. C# Overriding (virtual, override)
Method overriding allows you to define or implement a virtual method in a parent class and then replace it in a descendant class. In C#, you specify a virtual method with the virtual keyword in a parent class and replace it in a descendant class using the override keyword.
13 years ago, and updated 12 years ago
(4 Comments
, last by Faith.A )
|
 Code |
 Article |
 26914 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
46. C# Overview and History
Language Overview: C# is an OOP language (no global functions or variables) and is type-safe. You code using a fully OOP approach (everything is in a class).
Target Platforms: C# is most suitable for creating any type of application that runs on the .Net platform. This includes desktop business applications using WinForms and websites using WebForms.
13 years ago, and updated 12 years ago
|
 Code
 6548 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
47. C# Parameters
Defining In C# the data type of each parameter must be specified, even if adjacent parameters are of the same type.
13 years ago, and updated 12 years ago
|
 Code
 7183 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
48. C# Partial Classes (partial)
C# uses the keyword partial to specify a partial class. All parts must be in the same namespace.
A partial class, or partial type, is a class that can be split into two or more source code files and/or two or more locations within the same source file. Each partial class is known as a class part or just a part. Logically, partial classes do not make any difference to the compiler. The compiler puts the class together at compile time and treats the final class or type as a single entity exactly the same as if all the source code was in a single location.
You can use them for many things including to separate code generator code, organize large classes, divice a class up so you can split ownwership among multiple developers, have different versions of the same class, and to utilize multiple languages with a single class.
12 years ago, and updated 12 years ago
(1 Comments
, last by Assignment.H )
|
 Code |
 Article |
27950 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
49. C# Pointers
Although pointer data types in C# coding are less important than in other languages such as C++, C# does support developer defined pointers. Use the * operator to declare a pointer data type. Use the & operator to return the current address of a variable.
In .Net managed coding the use of pointers is not safe because the garbage collector may move memory around. To safely use pointers, use the unsafe keyword.
C++/CLI has more extensive support for pointers than C#. If you have needs that go beyond what C# offers, you can code in C++/CLI and add it to your project.
|
 Code
 9283 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
50. C# Polymorphism
C# supports the following types of polymorphism:
13 years ago, and updated 12 years ago
|
 Code
 8544 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
51. C# Prevent Derivation (sealed)
With C#, use the sealed keyword to prevent a class from being inherited from and to prevent a method from being overridden.
A method marked sealed must override an ancestor method. If you mark a class sealed, all members are implicitly not overridable so the sealed keyword on members is not legal.
13 years ago, and updated 12 years ago
|
 Code
 7363 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
52. C# Report Tools Overview
For WebForm applications the client target is the browser (a document interfaced GUI), a common solution is to simply output an HTML formatted page with black text and a white background (not much control but it does work for some situations). For WinForm applications, Crystal Reports is still a popular choice with C# developers because it has been bundled with many Microsoft products, it's overall popularity, and compatibility with many different development tools.
13 years ago, and updated 13 years ago
(1 Comments
, last by Anonymous )
|
 Code
 10235 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
53. C# Self Keyword (this)
To refer to the current instance of a class, use the this keyword. The this keyword provides a way to refer to the specific instance in which the code is currently executing. It is particularly useful for passing information about the currently executing instance.
The this keyword is also used as a modifier of the first parameter of an extension method.
You cannot use this with static method functions because static methods do not belong to an object instance. If you try, you'll get an error.
(4 Comments
, last by Mike.B3 )
|
 Code
 25140 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
54. C# Static Members (static)
C# supports both static members and static classes using the static keyword. You can add a static method, field, property, or event to an existing class. Also, you can designate a class as static and the compiler will ensure all members in that class are static. You can add a constructor to a static class to initialize values.
The CLR automatically loads static classes with the program or namespace.
13 years ago, and updated 12 years ago
|
 Code
 9364 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
55. C# String Concatenation (+)
C# String ConcatenationC# performs implicit casting of numbers to strings. To concatenate two strings, a string to an integer, or a string to a floating point number, use the + operator. For example, to convert a floating point number to a string just concatenate an empty string to the number as in "" + 3.2.
Alternatively, you can use the System.Text.StringBuilder class which frequently but not always provides faster code.
13 years ago, and updated 12 years ago
|
 Code
 7763 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
56. C# Substring
C# SubstringAbove returns "abcd" on a string literal. You can, of course, use VarName.Substring(0, 4).
|
 Code
 9877 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
57. C# Unary Operators
An operation with only one operand (a single input). The following are the C# unary operators: + , - , ! , ~ , ++ , -- , true , or false.
13 years ago, and updated 12 years ago
|
 Code
 9459 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
58. C# Variables (Int16 x=0;)
C++, Java, and C# all use C-like variable declaration.
C# has C-like variable declaration and although variables are case sensitive, VS.Net will auto-fix your variable names to the defined case.
C# offers many variable types. Some common types used include short, int, long, float, double, decimal, Int16, UInt16, Int32, Int64, string, and bool.
You can also specify the value when you declare a variable as in: String FirstName = "Mike"; String LastName = "Prestwood"; Int16 Age = 42;
13 years ago, and updated 12 years ago
|
 Code
 9626 Hits
|
 C# (Visual C# & VS.Net)
|
Adam Lum
|
59. Changing the Trust Level in your ASP.NET Web Applications
To restrict what an ASP.NET application can and cannot access and to provide an additional level of application isolation in a hosted environment, access security can be used. You do this by configuring the element in the machine-level Web.config file located in the following folder: %windir%\Microsoft.NET\Framework\{version}\CONFIG.
15 years ago, and updated 12 years ago
(77 Comments
, last by Xarema.D )
|
 KB Post
 54784 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
60. Coding for Application Virtualization
How do I take advantage of Application Virtualization in the application I'm coding?
13 years ago, and updated 13 years ago
|
 FAQ
 15377 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
61. Consuming an RSS feed in ASP.NET
Using this quickie code snippet, you can attach an ASP:Gridview to an external RSS Feed.
All you need to accomplish this is the URL of a usable feed.
(2 Comments
, last by Hanvi.j )
|
 Code
 19162 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
62. Creating a Windows Form with Add, Edit and Delete Record Capability in C#
This article describes how I designed a C# Windows form with add, edit and delete capability.
71 days ago, and updated 51 days ago
|
 Article
 112 Hits
|
 C# (Visual C# & VS.Net)
|
Adam Lum
|
63. C-Sharp Iterators, using yield
A quick example to demonstrate the yield keyword in the .NET Framework
14 years ago, and updated 12 years ago
(1 Comments
, last by william.k2 )
|
 KB Post
 11174 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
64. CSharp Language Specification (C#)
http://msdn.microsoft.com/en-us/library/aa664628(VS.71).aspx
|
 Link
 5939 Hits
|
 C# (Visual C# & VS.Net)
|
Daniel Fought
|
65. Delegate
A Delegate is a variable that references a method.
|
 Definition
 10088 Hits
|
 C# (Visual C# & VS.Net)
|
Adam Lum
|
66. Deploying your .NET Application with ClickOnce (quick tutorial)
A basic introduction to deploying an application using Visual Studio .NET 2005's ClickOnce
14 years ago, and updated 12 years ago
(1 Comments
, last by mprestwood )
|
 KB Post
 42248 Hits
|
 C# (Visual C# & VS.Net)
|
khemebuen
|
67. Extension Methods in C#
Add new methods to predefined types and objects with extension methods (no need to recompile the base code). To use this extension, all i have to do is include the namespace ExtensionExample.
12 years ago, and updated 11 months ago
(1 Entries
, last by Jason.B4 )
|
 Blog
 7340 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
68. Fibonacci Spiral App for Windows Phone
This article discusses the C# coding I created to make a Fibonnacci Spiral App for Windows Phone.
72 days ago, and updated 62 days ago
|
 Article
 53 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
69. FileUpload
Demonstrates the code required to retreive and store a file uploaded via an ASP FileUpload object. Assumes you have a web form with a FileUpload, a button, and a label control. Also, this example stores the file uploaded into a folder named "Uploads" which is assumed to pre-exist.
13 years ago, and updated 13 years ago
|
 Code
 6898 Hits
|
 C# (Visual C# & VS.Net)
|
Wes Peterson
|
70. Free E-Book on C# .NET Essentials
This is the "Chapter Zero" you've been missing.
|
 Download
 12502 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
71. Get all components in an ASPX page recursively
Retrieves an array of all the components of any given type within a starter control (such as a page, table, panel, etc.) This routine is recursive and will keep iterating down until all the embedded components are found.
This C# code can be invoked to produce an array as follows: CheckBox[] myCheckboxes = GetAllCheckboxes(Table1);
13 years ago, and updated 12 years ago
(11 Comments
, last by michael.m8 )
|
 Code
 10845 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
72. Get UserID using ASP.NET Built-in Membership
How do you resolve the UserID of a user when using ASP.NET 2.0's built in Membership utility?
13 years ago, and updated 12 years ago
|
 FAQ
 20599 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
73. Getting Website Root Directory in C# ASP.NET
This code shows how to ask the webserver where the site's root directory is, and how to convert a relative path (like /Uploads) to the full filesystem path. This will work across environments (i.e. Development/QA/Production).
13 years ago, and updated 12 years ago
(3 Comments
, last by Dean.M )
|
 Code
 18402 Hits
|
 C# (Visual C# & VS.Net)
|
Wes Peterson
|
74. Great Visual Studio Training Resource
If you've been around computing for any length of time, you know you can quickly spend a lot of money on those $60, five-pound reference books.
For just ten dollars more, you can get your hands on over 500 great training videos for Visual Studio .NET.
|
 Blog
 8092 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
75. How I Created a C Sharp Module for Automatic Data Back Up
This article describes the C# coding I used to create a module for automatic data back up.
71 days ago, and updated 51 days ago
(2 Comments
, last by Douglas.M )
|
 Article
 176 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
76. How to open a URL in a pop-up window.
Every now and then you want a link to open not only in a new browser, but you may want to give the new window the appearance of a pop-up window.
This ASP/Javascript method gives you a lot of control and is easy to figure out and implement.
13 years ago, and updated 12 years ago
(1 Comments
, last by Wes )
|
 KB Post
 50064 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
77. How to Populate Combo Box Control and Set Default Selection in C#
This article describes how I populate a combo box control in C# and designate the default selection.
|
 Article
 31 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
78. Insert Commas into a String Variable Using C#
This article is about C# programming I use to insert commas into string variables containing large numerical amounts.
|
 Article
 40 Hits
|
 C# (Visual C# & VS.Net)
|
Wes Peterson
|
79. MVC Coming to ASP .NET
The Model/View/Controller architecture is popular in windows desktop applications. Soon it will come to ASP .NET, as well.
|
 News
 6047 Hits
|
 C# (Visual C# & VS.Net)
|
Stephen Berry
|
80. Nullable Type
Nullable types are instances of System.Nullable(T). A Nullable type can represent any of the normal values for its value type or it can be assigned the value null. This is useful when dealing with databases that may have types that do not have a value.
|
 Definition
 9530 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
81. Programattically Adding Content to Web Pages in C#
Visual web developer offers a few different ways to add dynamic content to a web page. This will help you choose which one is right for your application.
In General, there are Data-Aware components, Labels, and PlaceHolders.
|
 Article
 8713 Hits
|
 C# (Visual C# & VS.Net)
|
Daniel Fought
|
82. Reference Data type variables
Variables that only contain a reference to the values. Reference data type variables only contain a reference to it's constituent value. Reference data types include objects and strings. Assignment of one reference type variable to another copies the reference, thus changes to the values in one variable changes the values in the other.
13 years ago, and updated 12 years ago
|
 Definition
 9857 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
83. Sending email from C#.NET in 5 lines of code.
First, you must add the System.Net.Mail namespace to your project. There are 2 objects we use to send the email, a MailMessage, and an SMTPClient. This code works from C# projects or from ASP.NET projects. Make sure your mail server is set to relay messages for whoever might be sending the message. In my case my webserver is sending through my exchange server so I had to tell exchange to relay for my webserver.
|
 Code
 7527 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
84. Shuffle a Sequentially Ordered Deck of Playing Cards Using C#
This article describes C# coding I use to shuffle a deck of playing cards.
71 days ago, and updated 43 days ago
|
 Article
 81 Hits
|
 C# (Visual C# & VS.Net)
|
Daniel Fought
|
85. Struct
A value type used to encapsulate a small set of related data.
13 years ago, and updated 13 years ago
|
 Definition
 8842 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
86. The Official Microsoft ASP.Net Site
http://www.asp.net/
|
 Link
 7276 Hits
|
 C# (Visual C# & VS.Net)
|
NE Ohio Computer Guy
|
87. Useful C# Windows Forms Input Masks
This article discusses three C# input masks I have used in my program design.
71 days ago, and updated 41 days ago
|
 Article
 57 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
88. Using a Legacy Windows DLL in ASP.NET
This article will show how to access a function in a legacy COM dll from a ASP.NET web page. By legacy I mean a dll that is not a .NET managed code dll (a Win32 DLL).
|
 KB Post
 11556 Hits
|
 C# (Visual C# & VS.Net)
|
Bryan Valencia
|
89. Using GenericIdentity for Cross Platform Authentication in the .NET framework
When designing a WinForms application, the most straightforward way to authenticate a user is using NTLM or Active Directory using WindowsIdentity.GetCurrent. Over the Internet, you can use the whole ASP.Net security setup with Membership.GetUser. The GenericPrincipal object works well when you deploy to a mixed web/WinForms environment. See new GenericIdentity.
|
 KB Post
 15179 Hits
|
 C# (Visual C# & VS.Net)
|
Wes Peterson
|
90. Using Win32 DLLs in .NET
Can I use a Win32 DLL in my Visual Studio.Net application?
(14 Comments
, last by Anderson.V )
|
 FAQ
 14787 Hits
|
 C# (Visual C# & VS.Net)
|
Daniel Fought
|
91. Value Data type variables
A Value data type variable contains values.
|
 Definition
 9557 Hits
|
 C# (Visual C# & VS.Net)
|
Mike Prestwood
|
92. VB Classic Prevent Derivation (Not Supported)
VB Classic supports a form of single level inheritance where you, in essence, create an abstract class and then implement it in one or more classes that inherit from the abstract class. However, you cannot have any further descendant classes so "prevent derivation" is implemented by design of this simple inheritance model.
13 years ago, and updated 12 years ago
|
 Code
 6119 Hits
|
 C# (Visual C# & VS.Net)
|