I need to install this at home. Let me c how this works
Released Version - openSUSE
Search my blog articles
Friday, March 31, 2006
Thursday, March 30, 2006
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
Great article I found for Lots of MSDN asp.net 2.0 links for how tos. Ofcourse in Scott's logs
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
C#.NET Interview Questions - Part 4- and More
If it were a relatively short interview, I would ask:
- Briefly explain how code behind works and contrast that using the inline
style.
- What are HTML controls, Web controls, and server controls.
- Briefly explain how the server control validation controls work.
- Briefly explain what user controls are and what server controls are and
the differences between the two.
- Briefly explain how server form post-back works (perhaps ask about view state as well).
- Can the action attribute of a server-side "Form" tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page. (Extra credit: Have you heard of comdna. :-)
- Briefly describe the role of global.asax.
- How would ASP and ASP.NET apps run at the same time on the same server?
- What are good ADO.NET object(s) to replace the ADO Recordset object.
- Briefly explain how code behind works and contrast that using the inline
style.
- What are HTML controls, Web controls, and server controls.
- Briefly explain how the server control validation controls work.
- Briefly explain what user controls are and what server controls are and
the differences between the two.
- Briefly explain how server form post-back works (perhaps ask about view state as well).
- Can the action attribute of a server-side "Form" tag be set to a value and if not how can you possibly pass data from a form page to a subsequent page. (Extra credit: Have you heard of comdna. :-)
- Briefly describe the role of global.asax.
- How would ASP and ASP.NET apps run at the same time on the same server?
- What are good ADO.NET object(s) to replace the ADO Recordset object.
ASP.NET Interview Questions - Part 3
Below is a list of 49 ASP.NET interview questions that I've
pulled from various sources - including this list group (pardon any
plagerism)...
Anybody with real asp.net experience who feels like they could make it
through most technical interviews on the subject care to give some
short/sweet top-of-my-head type answers to these.
If any of these beg more information, just say so. If any are unlikely
or unfair interview questions, just say so.
1. Explain the differences between Server-side and Client-side code?
2. What type of code (server or client) is found in a Code-Behind
class?
3. Should validation (did the user enter a real date) occur
server-side or client-side? Why?
4. What does the "EnableViewState" property do? Why would I want it on or off?
5. What is the difference between Server.Transfer and
Response.Redirect? Why
would I choose one over the other?
6. Can you give an example of when it would be appropriate to use a
web service as opposed to a non-serviced .NET component
7. Let's say I have an existing application written using Visual
Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000
COM+ transaction services. How would you approach migrating this
application to .NET
8. Can you explain the difference between an ADO.NET Dataset and an
ADO Recordset?
9. Can you give an example of what might be best suited to place in
the Application_Start and Session_Start subroutines?
10. If I'm developing an application that must accomodate multiple
security levels though secure login and my ASP.NET web appplication is
spanned across three web-servers (using round-robbin load balancing)
what would be the best approach to maintain login-in state for the
users?
11. What are ASP.NET Web Forms? How is this technology different than
what is available though ASP (1.0-3.0)?
12. How does VB.NET/C# achieve polymorphism?
11. Can you explain what inheritance is and an example of when you
might use it?
13. How would you implement inheritance using VB.NET/C#?
14. Whats an assembly
15. Describe the difference between inline and code behind - which is
best in a
16. loosely coupled solution
17. Explain what a diffgram is, and a good use for one
18. Where would you use an iHTTPModule, and what are the limitations
of any
19. approach you might take in implementing one
20. What are the disadvantages of viewstate/what are the benefits
21 Describe session handling in a webfarm, how does it work and what
are the > limits
22. How would you get ASP.NET running in Apache web servers - why
would you even do this?
23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
24. In what order do the events of an ASPX page execute. As a
developer is it important to undertsand these events?
25. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
26. Can you edit data in the Repeater control?
27. Which template must you provide, in order to display data in a
Repeater control?
28. How can you provide an alternating color scheme in a Repeater
control?
29. What property must you set, and what method must you call in your
code, in order to bind the data from some data source to the Repeater
control?
30. What base class do all Web Forms inherit from?
31. What method do you use to explicitly kill a user s session?
32 How do you turn off cookies for one page in your site?
33. Which two properties are on every validation control?
34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
35. How do you create a permanent cookie?
36. What tag do you use to add a hyperlink column to the DataGrid?
37. What is the standard you use to wrap up a call to a Web service
38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
39. What is the transport protocol you use to call a Web service SOAP
40. True or False: A Web service can only be written in .NET
41. What does WSDL stand for?
42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
43. Where on the Internet would you look for Web services?
44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
45. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
46. How is a property designated as read-only?
47. Which control would you use if you needed to make sure the values
in two different controls matched?
48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
49. How many classes can a single .NET DLL contain?
pulled from various sources - including this list group (pardon any
plagerism)...
Anybody with real asp.net experience who feels like they could make it
through most technical interviews on the subject care to give some
short/sweet top-of-my-head type answers to these.
If any of these beg more information, just say so. If any are unlikely
or unfair interview questions, just say so.
1. Explain the differences between Server-side and Client-side code?
2. What type of code (server or client) is found in a Code-Behind
class?
3. Should validation (did the user enter a real date) occur
server-side or client-side? Why?
4. What does the "EnableViewState" property do? Why would I want it on or off?
5. What is the difference between Server.Transfer and
Response.Redirect? Why
would I choose one over the other?
6. Can you give an example of when it would be appropriate to use a
web service as opposed to a non-serviced .NET component
7. Let's say I have an existing application written using Visual
Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000
COM+ transaction services. How would you approach migrating this
application to .NET
8. Can you explain the difference between an ADO.NET Dataset and an
ADO Recordset?
9. Can you give an example of what might be best suited to place in
the Application_Start and Session_Start subroutines?
10. If I'm developing an application that must accomodate multiple
security levels though secure login and my ASP.NET web appplication is
spanned across three web-servers (using round-robbin load balancing)
what would be the best approach to maintain login-in state for the
users?
11. What are ASP.NET Web Forms? How is this technology different than
what is available though ASP (1.0-3.0)?
12. How does VB.NET/C# achieve polymorphism?
11. Can you explain what inheritance is and an example of when you
might use it?
13. How would you implement inheritance using VB.NET/C#?
14. Whats an assembly
15. Describe the difference between inline and code behind - which is
best in a
16. loosely coupled solution
17. Explain what a diffgram is, and a good use for one
18. Where would you use an iHTTPModule, and what are the limitations
of any
19. approach you might take in implementing one
20. What are the disadvantages of viewstate/what are the benefits
21 Describe session handling in a webfarm, how does it work and what
are the > limits
22. How would you get ASP.NET running in Apache web servers - why
would you even do this?
23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
24. In what order do the events of an ASPX page execute. As a
developer is it important to undertsand these events?
25. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
26. Can you edit data in the Repeater control?
27. Which template must you provide, in order to display data in a
Repeater control?
28. How can you provide an alternating color scheme in a Repeater
control?
29. What property must you set, and what method must you call in your
code, in order to bind the data from some data source to the Repeater
control?
30. What base class do all Web Forms inherit from?
31. What method do you use to explicitly kill a user s session?
32 How do you turn off cookies for one page in your site?
33. Which two properties are on every validation control?
34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
35. How do you create a permanent cookie?
36. What tag do you use to add a hyperlink column to the DataGrid?
37. What is the standard you use to wrap up a call to a Web service
38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
39. What is the transport protocol you use to call a Web service SOAP
40. True or False: A Web service can only be written in .NET
41. What does WSDL stand for?
42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
43. Where on the Internet would you look for Web services?
44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
45. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
46. How is a property designated as read-only?
47. Which control would you use if you needed to make sure the values
in two different controls matched?
48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
49. How many classes can a single .NET DLL contain?
C#.NET Interview Questions - Part 2
1. What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and it’s datatype depends on whatever variable we’re changing.
1. How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++.
2. Does C# support multiple inheritance? No, use interfaces instead.
3. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
4. Are private class-level variables inherited? Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
5. Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
6. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.
7. What’s the top .NET class that everything is derived from? System.Object.
8. How’s method overriding different from overloading? When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
9. What does the keyword virtual mean in the method definition? The method can be over-ridden.
10. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
11. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
12. Can you prevent your class from being inherited and becoming a base class for some other classes? Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.
13. Can you allow class to be inherited, but prevent the method from being over-ridden? Yes, just leave the class public and make the method sealed.
14. What’s an abstract class? A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any implementation.
15. When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.
16. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.
17. Why can’t you specify the accessibility modifier for methods inside the interface? They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.
18. Can you inherit multiple interfaces? Yes, why not.
19. And if they have conflicting method names? It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
20. What’s the difference between an interface and abstract class? In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.
21. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters.
22. If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
23. What’s the difference between System.String and System.StringBuilder classes? System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
1. How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++.
2. Does C# support multiple inheritance? No, use interfaces instead.
3. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace.
4. Are private class-level variables inherited? Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.
5. Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
6. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.
7. What’s the top .NET class that everything is derived from? System.Object.
8. How’s method overriding different from overloading? When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
9. What does the keyword virtual mean in the method definition? The method can be over-ridden.
10. Can you declare the override method static while the original method is non-static? No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
11. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
12. Can you prevent your class from being inherited and becoming a base class for some other classes? Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.
13. Can you allow class to be inherited, but prevent the method from being over-ridden? Yes, just leave the class public and make the method sealed.
14. What’s an abstract class? A class that cannot be instantiated. A concept in C++ known as pure virtual method. A class that must be inherited and have the methods over-ridden. Essentially, it’s a blueprint for a class without any implementation.
15. When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? When at least one of the methods in the class is abstract. When the class itself is inherited from an abstract class, but not all base abstract methods have been over-ridden.
16. What’s an interface class? It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes.
17. Why can’t you specify the accessibility modifier for methods inside the interface? They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.
18. Can you inherit multiple interfaces? Yes, why not.
19. And if they have conflicting method names? It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
20. What’s the difference between an interface and abstract class? In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.
21. How can you overload a method? Different parameter data types, different number of parameters, different order of parameters.
22. If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
23. What’s the difference between System.String and System.StringBuilder classes? System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
C#.NET Interview Questions
1. How big is the datatype int in .NET? 32 bits.
2. How big is the char? 16 bits (Unicode).
3. How do you initiate a string without escaping each backslash? Put an @ sign in front of the double-quoted string.
4. What are valid signatures for the Main function?
· public static void Main()
· public static int Main()
· public static void Main( string[] args )
· public static int Main(string[] args )
5. How do you initialize a two-dimensional array that you don’t know the dimensions of?
· int [, ] myArray; //declaration
· myArray= new int [5, 8]; //actualinitialization
6. What’s the access level of the visibility type internal? Current assembly.
7. What’s the difference between struct and class in C#?
· Structscannot be inherited.
· Structsare passed by value, not by reference.
· Structis stored on the stack, not the heap.
8. Explain encapsulation. The implementation is hidden, the interface is exposed.
9. What data type should you use if you want an 8-bit value that’s signed? sbyte.
10. Speaking of Boolean data types, what’s different between C# and C/C++? There’s no conversion between 0 and false, as well as any other number and true, like in C/C++.
11. Where are the value-type variables allocated in the computer RAM? Stack.
12. Where do the reference-type variables go in the RAM? The references go on the stack, while the objects themselves go on the heap.
13. What is the difference between the value-type variables and reference-type variables in terms of garbage collection? The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
14. How do you convert a string into an integer in .NET? Int32.Parse(string)
15. How do you box a primitive data type variable? Assign it to the object, pass an object.
16. Why do you need to box a primitive variable? To pass it by reference.
17. What’s the difference between Java and .NET garbage collectors? Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.
18. How do you enforce garbage collection in .NET? System.GC.Collect();
19. Can you declare a C++ type destructor in C# like ~MyClass()? Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector.
20. What’s different about namespace declaration when comparing that to package declaration in Java? No semicolon.
21. What’s the difference between const and readonly? You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare public readonly string DateT = new DateTime().ToString().
22. What does \a character do? On most systems, produces a rather annoying beep.
23. Can you create enumerated data types in C#? Yes.
24. What’s different about switch statements in C#? No fall-throughs allowed.
25. What happens when you encounter a continue statement inside the for loop? The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
26. Is goto statement supported in C#? How about Java? Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality.
2. How big is the char? 16 bits (Unicode).
3. How do you initiate a string without escaping each backslash? Put an @ sign in front of the double-quoted string.
4. What are valid signatures for the Main function?
· public static void Main()
· public static int Main()
· public static void Main( string[] args )
· public static int Main(string[] args )
5. How do you initialize a two-dimensional array that you don’t know the dimensions of?
· int [, ] myArray; //declaration
· myArray= new int [5, 8]; //actualinitialization
6. What’s the access level of the visibility type internal? Current assembly.
7. What’s the difference between struct and class in C#?
· Structscannot be inherited.
· Structsare passed by value, not by reference.
· Structis stored on the stack, not the heap.
8. Explain encapsulation. The implementation is hidden, the interface is exposed.
9. What data type should you use if you want an 8-bit value that’s signed? sbyte.
10. Speaking of Boolean data types, what’s different between C# and C/C++? There’s no conversion between 0 and false, as well as any other number and true, like in C/C++.
11. Where are the value-type variables allocated in the computer RAM? Stack.
12. Where do the reference-type variables go in the RAM? The references go on the stack, while the objects themselves go on the heap.
13. What is the difference between the value-type variables and reference-type variables in terms of garbage collection? The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
14. How do you convert a string into an integer in .NET? Int32.Parse(string)
15. How do you box a primitive data type variable? Assign it to the object, pass an object.
16. Why do you need to box a primitive variable? To pass it by reference.
17. What’s the difference between Java and .NET garbage collectors? Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection.
18. How do you enforce garbage collection in .NET? System.GC.Collect();
19. Can you declare a C++ type destructor in C# like ~MyClass()? Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector.
20. What’s different about namespace declaration when comparing that to package declaration in Java? No semicolon.
21. What’s the difference between const and readonly? You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare public readonly string DateT = new DateTime().ToString().
22. What does \a character do? On most systems, produces a rather annoying beep.
23. Can you create enumerated data types in C#? Yes.
24. What’s different about switch statements in C#? No fall-throughs allowed.
25. What happens when you encounter a continue statement inside the for loop? The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
26. Is goto statement supported in C#? How about Java? Gotos are supported in C#to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality.
Monday, March 27, 2006
dmitryr's blog : RSS Toolkit Update
This Article should be interesting.
dmitryr's blog : RSS Toolkit Update
dmitryr's blog : RSS Toolkit Update
Monday, March 20, 2006
A CAPTCHA Control for ASP.NET 2
Hmm, I have used similar code like a year back and this kid just put it as an article ?!? - Infact this code is as is in msdn.com.
File Row Splitting Based on Defined Enumerators
using System;
using System.IO;
using System.Collections;
using System.Configuration;
namespace HAX_ELIG_IB
{
///
/// Summary description for IBFile.
///
public class IBFile
{
public enum IBRecordType
{
I1 = 1,
I2 ,
I3 ,
S ,
C ,
D1,
D2,
D3
}
private string fileName = string.Empty;
private string filenamepath = string.Empty;
private FileStream aFileStream = null;
private IBRecordType aRectype = 0;
public IBRecordType RecType
{
get
{
return this.aRectype;
}
}
StreamWriter fileStreamWriter = null;
public IBFile(IBRecordType TypeofRecord)
{
string filenamepath = ((string)ConfigurationSettings.AppSettings.GetValues("RecordFileNamePath").GetValue(0));
fileName = filenamepath + Enum.GetName(typeof(IBFile.IBRecordType),TypeofRecord) + ".txt";
fileStreamWriter = File.CreateText(fileName);
this.aRectype = TypeofRecord;
}
public void WriteLine(string Line)
{
fileStreamWriter.WriteLine(Line);
}
public void CloseFile()
{
this.fileStreamWriter.Close();
}
}
}
#region Using Directives
using System;
using System.Collections;
using System.Text;
#endregion
namespace HAX_ELIG_IB
{
public class IBFileCollection : CollectionBase
{
#region Properties
public IBFile this [int index]
{
get
{
return (IBFile) List[index];
}
}
#endregion
#region Business Logic
public bool Find(IBFile.IBRecordType aRtype, out IBFile aFile)
{
foreach (IBFile current in this)
{
if (current.RecType == aRtype)
{
aFile = current;
return true;
}
}
aFile = null;
return false;
}
public void Add(IBFile.IBRecordType aRectype)
{
List.Add(new IBFile(aRectype));
}
public bool Contains(IBFile aItem)
{
foreach (IBFile child in List)
{
if (child.Equals(aItem))
{
return true;
}
}
return false;
}
public void WriteLine(string line, IBFile.IBRecordType aRecType)
{
foreach (IBFile current in this)
{
if (current.RecType == aRecType)
{
current.WriteLine(line);
return;
}
}
}
#endregion
#region Constructor
public IBFileCollection()
{
foreach(string filetype in Enum.GetNames(typeof(IBFile.IBRecordType)))
{
this.Add((IBFile.IBRecordType)Enum.Parse(typeof(IBFile.IBRecordType),filetype));
}
}
public void CloseAll()
{
foreach(IBFile ibfile in this)
{
ibfile.CloseFile();
}
}
#endregion
}
}
web.config
using System.IO;
using System.Collections;
using System.Configuration;
namespace HAX_ELIG_IB
{
///
/// Summary description for IBFile.
///
public class IBFile
{
public enum IBRecordType
{
I1 = 1,
I2 ,
I3 ,
S ,
C ,
D1,
D2,
D3
}
private string fileName = string.Empty;
private string filenamepath = string.Empty;
private FileStream aFileStream = null;
private IBRecordType aRectype = 0;
public IBRecordType RecType
{
get
{
return this.aRectype;
}
}
StreamWriter fileStreamWriter = null;
public IBFile(IBRecordType TypeofRecord)
{
string filenamepath = ((string)ConfigurationSettings.AppSettings.GetValues("RecordFileNamePath").GetValue(0));
fileName = filenamepath + Enum.GetName(typeof(IBFile.IBRecordType),TypeofRecord) + ".txt";
fileStreamWriter = File.CreateText(fileName);
this.aRectype = TypeofRecord;
}
public void WriteLine(string Line)
{
fileStreamWriter.WriteLine(Line);
}
public void CloseFile()
{
this.fileStreamWriter.Close();
}
}
}
#region Using Directives
using System;
using System.Collections;
using System.Text;
#endregion
namespace HAX_ELIG_IB
{
public class IBFileCollection : CollectionBase
{
#region Properties
public IBFile this [int index]
{
get
{
return (IBFile) List[index];
}
}
#endregion
#region Business Logic
public bool Find(IBFile.IBRecordType aRtype, out IBFile aFile)
{
foreach (IBFile current in this)
{
if (current.RecType == aRtype)
{
aFile = current;
return true;
}
}
aFile = null;
return false;
}
public void Add(IBFile.IBRecordType aRectype)
{
List.Add(new IBFile(aRectype));
}
public bool Contains(IBFile aItem)
{
foreach (IBFile child in List)
{
if (child.Equals(aItem))
{
return true;
}
}
return false;
}
public void WriteLine(string line, IBFile.IBRecordType aRecType)
{
foreach (IBFile current in this)
{
if (current.RecType == aRecType)
{
current.WriteLine(line);
return;
}
}
}
#endregion
#region Constructor
public IBFileCollection()
{
foreach(string filetype in Enum.GetNames(typeof(IBFile.IBRecordType)))
{
this.Add((IBFile.IBRecordType)Enum.Parse(typeof(IBFile.IBRecordType),filetype));
}
}
public void CloseAll()
{
foreach(IBFile ibfile in this)
{
ibfile.CloseFile();
}
}
#endregion
}
}
web.config
Friday, March 17, 2006
Monday, March 13, 2006
Friday, March 03, 2006
SmartIndie 3800 X2 Development PC
Athenatech A301BS.400 Black / Silver Steel MicroATX Mini Tower Computer Case 400W Power Supply - Retail
ASUS A8N-VM CSM Socket 939 NVIDIA GeForce 6150 Micro ATX AMD Motherboard - Retail
Kingston ValueRAM 2GB (2 x 1GB) 184-Pin DDR SDRAM DDR 400 (PC 3200) Unbuffered Dual Channel Kit System Memory Model KVR400AK2/2GR - Retail
ZALMAN CNPS7700-CU 120mm 2 Ball Cooling Fan with Copper Heatsink - Retail
ASUS A8N-VM CSM Socket 939 NVIDIA GeForce 6150 Micro ATX AMD Motherboard - Retail
Kingston ValueRAM 2GB (2 x 1GB) 184-Pin DDR SDRAM DDR 400 (PC 3200) Unbuffered Dual Channel Kit System Memory Model KVR400AK2/2GR - Retail
ZALMAN CNPS7700-CU 120mm 2 Ball Cooling Fan with Copper Heatsink - Retail
Subscribe to:
Posts (Atom)