Click here to Skip to main content
15,923,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: Office Programming with C# Pin
Heath Stewart28-Oct-04 15:35
protectorHeath Stewart28-Oct-04 15:35 
GeneralIIS server Pin
ppp00128-Oct-04 6:41
ppp00128-Oct-04 6:41 
GeneralRe: IIS server Pin
Alex Korchemniy28-Oct-04 9:59
Alex Korchemniy28-Oct-04 9:59 
GeneralRe: IIS server Pin
Heath Stewart28-Oct-04 15:22
protectorHeath Stewart28-Oct-04 15:22 
GeneralAVI to WMV Pin
ee9903528-Oct-04 6:00
ee9903528-Oct-04 6:00 
GeneralRe: AVI to WMV Pin
Heath Stewart28-Oct-04 15:10
protectorHeath Stewart28-Oct-04 15:10 
GeneralXslTransform object protection level problem Pin
kroakdammit28-Oct-04 5:48
kroakdammit28-Oct-04 5:48 
GeneralRe: XslTransform object protection level problem Pin
Heath Stewart28-Oct-04 15:05
protectorHeath Stewart28-Oct-04 15:05 
There several things wrong with this line:
myXsl.Load(ConfigurationSettings.AppSettings["XsltImportTransform"]);
What if the .config file isn't present or that setting isn't found? Either do validation checking or catch the inevitable exception that will occur from the null return value. Validation is far less expensive than throwing exceptions, though you should do that anyway (the XML document that contains the XSLT might be invalid, so Load will throw an exception).

What is that property called? You said you encapsulated the preceeding line in a property? Depending on the namespaces you're importing for that source file and the name of the property, you may have a naming conflict. Showing us line 122 and surrounding lines of Integration.cs would be most helpful.

For example, if you're importing System.Xml.Xsl and your property type and name are both XslTransform then you'll have a name clash and the compiler will complain (how it complains depends on the circumstances). If this is the case, you should either fully-qualify your property type or use an alias like so:
using XSLT = System.Xml.Xsl.XslTransform;
// ...
public XSLT XslTransform
{
  get { return ConfigurationSettings.AppSettings["XsltImportTransform"]; }
}
Don't forget to dermine if that property returns null.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: XslTransform object protection level problem Pin
kroakdammit28-Oct-04 23:24
kroakdammit28-Oct-04 23:24 
GeneralRe: XslTransform object protection level problem Pin
kroakdammit28-Oct-04 23:33
kroakdammit28-Oct-04 23:33 
GeneralCopy a piece of an Image Pin
delemur28-Oct-04 5:20
delemur28-Oct-04 5:20 
GeneralRe: Copy a piece of an Image Pin
Christian Graus28-Oct-04 9:36
protectorChristian Graus28-Oct-04 9:36 
GeneralRe: Copy a piece of an Image Pin
Alex Korchemniy28-Oct-04 9:56
Alex Korchemniy28-Oct-04 9:56 
QuestionHow to do this in C#? Pin
momer28-Oct-04 5:02
momer28-Oct-04 5:02 
AnswerRe: How to do this in C#? Pin
Christian Graus28-Oct-04 9:39
protectorChristian Graus28-Oct-04 9:39 
GeneralRe: How to do this in C#? Pin
Mike Dimmick28-Oct-04 10:47
Mike Dimmick28-Oct-04 10:47 
GeneralRe: How to do this in C#? Pin
momer28-Oct-04 14:57
momer28-Oct-04 14:57 
GeneralRe: How to do this in C#? Pin
Christian Graus28-Oct-04 15:01
protectorChristian Graus28-Oct-04 15:01 
GeneralRe: adding parameter to eventhandler Pin
sreejith ss nair28-Oct-04 2:18
sreejith ss nair28-Oct-04 2:18 
GeneralRe: adding parameter to eventhandler Pin
Stefan Troschuetz28-Oct-04 2:44
Stefan Troschuetz28-Oct-04 2:44 
GeneralRe: adding parameter to eventhandler Pin
Nick Parker28-Oct-04 3:35
protectorNick Parker28-Oct-04 3:35 
GeneralRe: adding parameter to eventhandler Pin
Member 147654828-Oct-04 3:51
Member 147654828-Oct-04 3:51 
GeneralRe: adding parameter to eventhandler Pin
Nick Parker28-Oct-04 5:01
protectorNick Parker28-Oct-04 5:01 
GeneralRe: adding parameter to eventhandler Pin
Anonymous28-Oct-04 6:08
Anonymous28-Oct-04 6:08 
GeneralRe: adding parameter to eventhandler Pin
Heath Stewart28-Oct-04 14:52
protectorHeath Stewart28-Oct-04 14:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.